{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template block_timeline/nav-day-filter

    This template renders the day range selector for the timeline view.

    Example context (json):
    {}
}}
<div data-region="day-filter" class="dropdown">
    <button type="button" class="btn btn-sm btn-secondary dropdown-toggle icon-no-margin" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
            aria-label="{{#str}} ariadayfilter, block_timeline {{/str}}" aria-controls="menudayfilter" title="{{#str}} ariadayfilter, block_timeline{{/str}}" aria-describedby="timeline-day-filter-current-selection">
            <span class="rui-btn--icon">
                <svg width="16" height="16" fill="none" viewBox="0 0 24 24">
                    <circle cx="12" cy="12" r="7.25" stroke="currentColor" stroke-width="2"></circle>
                    <path stroke="currentColor" stroke-width="2" d="M12 8V12L14 14"></path>
                </svg>
            </span>
        </span>
        <span id="timeline-day-filter-current-selection" data-active-item-text class="ml-2">
            {{#all}} {{#str}} all, core {{/str}} {{/all}}
            {{#overdue}} {{#str}} overdue, block_timeline {{/str}} {{/overdue}}
            {{#next7days}} {{#str}}next7days, block_timeline {{/str}} {{/next7days}}
            {{#next30days}} {{#str}}next30days, block_timeline {{/str}} {{/next30days}}
            {{#next3months}} {{#str}}next3months, block_timeline {{/str}} {{/next3months}}
            {{#next6months}} {{#str}}next6months, block_timeline {{/str}} {{/next6months}}
        </span>
    </button>
    <div id="menudayfilter" role="menu" class="dropdown-menu" data-show-active-item data-skip-active-class="true">
        <a
            class="dropdown-item"
            href="#"
            data-from="-14"
            data-filtername="all"
            {{#all}}aria-current="true"{{/all}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} all, core {{/str}}
        </a>
        <a
            class="dropdown-item"
            href="#"
            data-from="-14"
            data-to="1"
            data-filtername="overdue"
            {{#overdue}}aria-current="true"{{/overdue}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} overdue, block_timeline {{/str}}
        </a>
        <div class="dropdown-divider" role="separator"></div>
        <h6 class="dropdown-header">{{#str}} duedate, block_timeline {{/str}}</h6>
        <a
            class="dropdown-item"
            href="#"
            data-from="0"
            data-to="7"
            data-filtername="next7days"
            {{#next7days}}aria-current="true"{{/next7days}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} next7days, block_timeline {{/str}}
        </a>
        <a
            class="dropdown-item"
            href="#"
            data-from="0"
            data-to="30"
            data-filtername="next30days"
            {{#next30days}}aria-current="true"{{/next30days}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} next30days, block_timeline {{/str}}
        </a>
        <a
            class="dropdown-item"
            href="#"
            data-from="0"
            data-to="90"
            data-filtername="next3months"
            {{#next3months}}aria-current="true"{{/next3months}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} next3months, block_timeline {{/str}}
        </a>
        <a
            class="dropdown-item"
            href="#"
            data-from="0"
            data-to="180"
            data-filtername="next6months"
            {{#next6months}}aria-current="true"{{/next6months}}
            aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next6months, block_timeline {{/str}}{{/str}}"
            role="menuitem"
        >
            {{#str}} next6months, block_timeline {{/str}}
        </a>
    </div>
</div>
