{{!
    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 mod_attendance/filter_controls

    Attendance filtering controls

    Example context (json):
    {
        "modeallsessions": true,
        "groupingcontrols": "Grouping Controls",
        "coursecontrols": "Course Controls",
        "sessgroupselector": "Session Group Selector",
        "addsession": "Add Session Button",
        "curdatecontrols": "Current Date Controls",
        "pagingcontrols": "Pagination Controls",
        "viewcontrols": "View Controls"
    }
}}

<div class="attfiltercontrols mb-3">

    {{#modeallsessions}}
        <div class="modeallsessions mb-3">
            <div class="row mx-n2 justify-content-between flex-xl-column align-items-xl-end">
                {{#groupingcontrols}}
                    <div class="groupingcontrols col-auto px-2">
                        {{{groupingcontrols}}}
                    </div>
                {{/groupingcontrols}}
                {{#coursecontrols}}
                    <div class="coursecontrols col-auto px-2">
                        {{{coursecontrols}}}
                    </div>
                {{/coursecontrols}}   
            </div> 
        </div>
    {{/modeallsessions}}

    <div class="row m-n2">
        {{#sessgroupselector}}
            <div class="sessgroupselector col-auto p-2">
                {{{sessgroupselector}}}
            </div>
        {{/sessgroupselector}}
        {{#addsession}}
            <div class="addsession col-auto p-2">
                {{{addsession}}}
            </div>
        {{/addsession}}
        {{#curdatecontrols}}
            <div class="curdatecontrols col-auto d-flex align-items-center p-2">
                {{{curdatecontrols}}}
            </div>
        {{/curdatecontrols}}
        {{#pagingcontrols}}
            <div class="pagingcontrols col-auto d-flex align-items-center p-2 ml-xl-auto">
                {{{pagingcontrols}}}
            </div>
        {{/pagingcontrols}}
        {{#viewcontrols}}
            <div class="viewcontrols col-auto p-2 {{^pagingcontrols}}ml-xl-auto{{/pagingcontrols}}">
                {{{viewcontrols}}}
            </div>
        {{/viewcontrols}}
    </div>
</div>