<?xml version="1.0" encoding="UTF-8" ?>
<templates>
    <t t-name="account_intrastat.IntrastatReportFilterOptions">
        <Dropdown menuClass="'account_report'">
            <button class="btn btn-secondary">
                <i class="fa fa-sliders me-1"/><t t-out="selectedIntrastatOptions"/>
            </button>

            <t t-set-slot="content">
                <t t-foreach="controller.options.intrastat_type" t-as="intrastatType" t-key="intrastatType_index">
                    <DropdownItem
                        class="{ 'selected': intrastatType.selected }"
                        onSelected="() => this.filterClicked({ optionKey: 'intrastat_type.' + intrastatType_index + '.selected', reload: true})"
                        closingMode="'none'"
                        t-out="intrastatType.name"
                    />
                </t>

                <div class="dropdown-divider"/>

                <DropdownItem
                    class="{ 'selected': controller.options.intrastat_with_vat }"
                    onSelected="() => this.filterClicked({ optionKey: 'intrastat_with_vat', reload: true})"
                    closingMode="'none'"
                >
                    Only with VAT numbers
                </DropdownItem>

                <DropdownItem
                    class="{ 'selected': controller.options.intrastat_extended }"
                    onSelected="() => this.filterClicked({ optionKey: 'intrastat_extended', reload: true})"
                    closingMode="'none'"
                >
                    Extended Mode
                </DropdownItem>
            </t>
        </Dropdown>
    </t>
</templates>
