<?xml version="1.0"?>
<t name="Radio and Multi attributes in Filter" t-name="website_sale.filter_radio_and_multi_attributes">
        <t t-set="sorted_values" t-value="sorted(a.value_ids, key=lambda v: v.id not in attrib_set)"/>
        <t t-if="len(sorted_values) &lt;= 20">
            <div t-foreach="sorted_values[:8]" t-as="v" t-attf-class="{{'list-group-item border-0 ps-0 pb-0' if isMobile else ''}}">
                <div class="form-check mb-1">
                    <input type="checkbox" name="attribute_value" class="form-check-input" t-att-id="'%s-%s' % (a.id,v.id)" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="v.id in attrib_set"/>
                    <label class="form-check-label fw-normal" t-att-for="'%s-%s' % (a.id,v.id)" t-field="v.name"/>
                </div>
            </div>
            <t t-if="len(sorted_values) &gt; 8">
                <div t-attf-id="o_wsale_remaining_values_{{a.id}}" class="accordion-collapse collapse" t-attf-aria-labelledby="o_wsale_view_more_{{a.id}}_header">
                    <div t-foreach="sorted_values[8:]" t-as="v" t-attf-class="{{'list-group-item border-0 ps-0 pb-0' if isMobile else ''}}">
                        <div class="form-check mb-1">
                            <input type="checkbox" name="attribute_value" class="form-check-input" t-att-id="'%s-%s' % (a.id,v.id)" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="v.id in attrib_set"/>
                            <label class="form-check-label fw-normal" t-att-for="'%s-%s' % (a.id,v.id)" t-field="v.name"/>
                        </div>
                    </div>
                </div>
                <div t-attf-id="o_wsale_view_more_{{a.id}}_header" t-attf-class="accordion-header {{'mb-0' if isMobile else ''}}">
                    <button type="button" class="o_wsale_view_more_btn btn btn-link px-0 collapsed" data-bs-toggle="collapse" t-attf-data-bs-target="#o_wsale_remaining_values_{{a.id}}" t-attf-aria-controls="o_wsale_remaining_values_{{a.id}}" aria-expanded="false">
                        View More
                    </button>
                </div>
            </t>
        </t>
        <t t-elif="len(sorted_values) &gt; 20">
            <div t-attf-class="{{'my-3' if isMobile else 'mb-3'}}">
                <input type="text" class="o_wsale_attribute_search_bar form-control" t-att-placeholder="'Search %s (%s)' % (a.name, len(a.value_ids))" t-att-data-container-id="'searchable-values-%s' % a.id"/>
            </div>
            <div t-attf-id="searchable-values-{{ a.id }}" class="overflow-auto" t-attf-style="max-height:{{'290px' if isMobile else '220px'}};">
                <t t-foreach="sorted_values" t-as="v">
                    <div t-attf-class="form-check mb-1 {{'list-group-item border-0 ms-3 pb-0' if isMobile else 'ms-1'}}">
                        <input type="checkbox" name="attribute_value" class="form-check-input" t-att-id="'%s-%s' % (a.id,v.id)" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="v.id in attrib_set"/>
                        <label class="form-check-label fw-normal" t-att-for="'%s-%s' % (a.id,v.id)" t-field="v.name"/>
                    </div>
                </t>
            </div>
        </t>
    </t>

    