{{!
    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_myoverview/nav-grouping-selector

    This template renders grouping dropdown.

    Example context (json):
    {
        "today": true,
        "inprogress": false,
        "future": false,
        "past": false
    }
}}
<div class="dropdown duration-filter filter-item" data-region="task-duration-filter">
    <button id="taskduration" type="button" class="btn  dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} eventduration, core_calendar {{/str}}" title=" {{#str}} today {{/str}}">
        <span class="d-sm-inline-block" data-active-item-text>
            {{#str}} today {{/str}}
        </span>
    </button>
    <ul class="dropdown-menu dropdown-menu-left" data-show-active-item data-active-item-text aria-labelledby="taskduration">
        <li>
            <a class="dropdown-item" href="#" data-filter="grouping" data-value="all" data-pref="all" aria-label="{{#str}} all {{/str}}" aria-controls="courses-view-{{uniqid}}" title="{{#str}} all {{/str}}">
                {{#str}} all {{/str}}
            </a>
        </li>
        <li>
            <a class="dropdown-item active" href="#" data-filter="grouping" data-value="today" data-pref="today" aria-label="{{#str}} today {{/str}}" aria-controls="courses-view-{{uniqid}}" title="{{#str}} today {{/str}}">
                {{#str}} today {{/str}}
            </a>
        </li>
        <li>
            <a class="dropdown-item" href="#" data-filter="grouping" data-value="next7days" data-pref="next7days" aria-label="{{#str}} next7days, block_remuiblck {{/str}}" aria-controls="courses-view-{{uniqid}}" title=" {{#str}} next7days, block_remuiblck {{/str}}">
                {{#str}} next7days, block_remuiblck {{/str}}
            </a>
        </li>
        <li>
            <a class="dropdown-item" href="#" data-filter="grouping" data-value="next30days" data-pref="next30days" aria-label="{{#str}} next30days, block_remuiblck {{/str}}" aria-controls="courses-view-{{uniqid}}" title="{{#str}} next30days, block_remuiblck {{/str}}">
                {{#str}} next30days, block_remuiblck {{/str}}
            </a>
        </li>
        <li>
            <a class="dropdown-item" href="#" data-filter="grouping" data-value="next3months" data-pref="next3months" aria-label="{{#str}} next3months, block_remuiblck {{/str}}" aria-controls="courses-view-{{uniqid}}" title="{{#str}} next3months, block_remuiblck {{/str}}">
                {{#str}} next3months, block_remuiblck {{/str}}
            </a>
        </li>
        <li>
            <a class="dropdown-item" href="#" data-filter="grouping" data-value="next6months" data-pref="next6months" aria-label="{{#str}} next6months, block_remuiblck {{/str}}" aria-controls="courses-view-{{uniqid}}" title="{{#str}} next6months, block_remuiblck {{/str}}">
                {{#str}} next6months, block_remuiblck {{/str}}
            </a>
        </li>
    </ul>
</div>
