<!--
/**
 * Copyright (c) 2016 maijindou.com. All rights reserved.
 * See COPYING.txt for license details.
 */
-->

<div
    class="admin__action-dropdown-wrap admin__data-grid-action-export"
    data-bind="collapsible">
    <button
        class="admin__action-dropdown"
        type="button"
        data-bind="toggleCollapsible"
        data-toggle="dropdown"
        aria-haspopup="true">
        <span class="admin__action-dropdown-text" data-bind="i18n: 'Export'"></span>
    </button>
    <div class="admin__action-dropdown-menu admin__data-grid-action-export-menu">
        <!-- ko foreach: options -->
        <div class="admin__field admin__field-option">
            <input
                class="admin__control-radio"
                data-bind="
                    attr: {
                        id: ++ko.bindingHandlers['uniqueName'].currentIndex + '_uid',
                        name: $parent.name
                    },
                    checkedValue: value,
                    checked: $parent.checked"
                type="radio"/>
            <label
                class="admin__field-label"
                data-bind="
                    text: label,
                    attr: {
                        for:  ko.bindingHandlers['uniqueName'].currentIndex + '_uid'
                    }"></label>
        </div>
        <!-- /ko -->
        <div class="admin__action-dropdown-footer-main-actions">
            <button
                class="action-tertiary"
                data-bind="closeCollapsible"
                type="button">
                <span data-bind="i18n: 'Cancel'"></span>
            </button>
            <button class="action-secondary"
                type="button"
                data-bind="click: applyOption">
                <span data-bind="i18n: 'Export'"></span>
            </button>
        </div>
    </div>
</div