<?xml version="1.0"?>
<t name="Offcanvas" t-name="website_sale.o_wsale_offcanvas">
        <aside id="o_wsale_offcanvas" class="o_website_offcanvas offcanvas offcanvas-end p-0">
            <div class="offcanvas-header justify-content-end">
                <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"/>
            </div>
            <div t-if="is_view_active('website_sale.search') and (opt_wsale_attributes or opt_wsale_attributes_top)" class="offcanvas-body flex-grow-0 overflow-visible">
                <t t-call="website_sale.search">
                    <t t-if="category" t-set="placeholder">Search in <t t-out="category.name"/></t>
                    <t t-set="search" t-value="original_search or search"/>
                    <t t-set="_s_searchbar_autocomplete_classes" t-valuef="bg-primary"> </t>
                </t>
            </div>
            <div id="o_wsale_offcanvas_content" class="accordion accordion-flush flex-grow-1 overflow-auto">
                <!-- Show sorting only if it's not avavailbe in the topbar already -->
                <div t-if="not is_view_active('website_sale.sort')" class="accordion-item">
                    <t t-if="isSortingBy" t-set="isSortingBy" t-value="isSortingBy[0][1]"/>
                    <t t-else="" t-set="isSortingBy" t-value="website.shop_default_sort"/>
                    <h2 id="o_wsale_offcanvas_orderby_header" class="accordion-header mb-0">
                        <button class="o_wsale_offcanvas_title accordion-button rounded-0 collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#o_wsale_offcanvas_orderby" aria-expanded="false" aria-controls="o_wsale_offcanvas_orderby">
                                <b>Sort By</b>
                        </button>
                    </h2>
                    <div id="o_wsale_offcanvas_orderby" class="accordion-collapse collapse" aria-labelledby="o_wsale_offcanvas_orderby_header">
                        <div class="accordion-body pt-0">
                            <div class="list-group list-group-flush">
                                <a t-foreach="website_sale_sortable" t-as="sortby" role="menuitem" rel="noindex,nofollow" t-att-href="keep(order=sortby[0])" class="list-group-item border-0 ps-0 pb-0">
                                    <div class="form-check d-inline-block">
                                        <input type="radio" t-attf-onclick="location.href='#{keep(order=sortby[0])}';" class="form-check-input o_not_editable" name="wsale_sortby_radios_offcanvas" t-att-checked="isSortingBy and isSortingBy == sortby[1]">
                                            <label class="form-check-label fw-normal" t-out="sortby[1]"/>
                                        </input>
                                    </div>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
                <div t-if="opt_wsale_categories" class="accordion-item">
                    <h2 id="o_wsale_offcanvas_categories_header" class="accordion-header mb-0">
                        <button class="o_wsale_offcanvas_title accordion-button rounded-0 collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#o_wsale_offcanvas_categories" aria-expanded="false" aria-controls="o_wsale_offcanvas_categories">
                                <b>Categories</b>
                        </button>
                    </h2>
                    <div id="o_wsale_offcanvas_categories" class="accordion-collapse collapse" aria-labelledby="o_wsale_offcanvas_categories_header">
                        <div class="accordion-body pt-0">
                            <t t-call="website_sale.products_categories_list">
                                <t t-set="isOffcanvas" t-value="true"/>
                                <t t-set="_titleClasses" t-valuef="d-none"/>
                                <t t-set="_radioGroup" t-valuef="_offcanvas"/>
                            </t>
                        </div>
                    </div>
                </div>
                <t t-call="website_sale.product_attribute_filters_form">
                    <t t-set="isMobile" t-value="True"/>
                </t>
                <t t-if="opt_wsale_filter_price and (opt_wsale_attributes or opt_wsale_attributes_top)" t-call="website_sale.filter_products_price">
                    <t t-set="_classes" t-valuef="o_wsale_offcanvas_title accordion accordion-flush px-4"/>
                    <t t-set="_classes_title" t-valuef="ms-n1 pt-3 pb-2"/>
                    <t t-set="isOffcanvas" t-value="True"/>
                </t>
            </div>
            <div class="offcanvas-body d-flex justify-content-between flex-grow-0 border-top overflow-hidden">
                <a t-attf-class="btn btn-{{navClass}} d-flex py-1 mb-2 {{(not attrib_values and not isFilteringByPrice and not tags) and 'disabled' }}" t-att-aria-disabled="(not attrib_values and not isFilteringByPrice and not tags) and 'true' or 'false'" t-att-href="keep(attribute_values=0, tags=0, min_price=0, max_price=0)" title="Clear Filters">
                    Clear Filters
                </a>
            </div>
        </aside>
    </t>


    