{{!
    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 gradereport_singleview/page_toggler

    The small selector at the top right of the page to switch between zero states.

    Example context (json):
    {
        "displaylabel": true,
        "userzerolink": "http://foo.bar/gradereport/?userid=25",
        "userselectactive": "false",
        "gradepagepage": "http://foo.bar/gradereport/?userid=25",
        "gradeselectactive": "true"
    }
}}
<div class="page-toggler d-block d-sm-flex text-nowrap">
    {{#displaylabel}}
        <p class="my-auto me-3 text-uppercase">{{#str}}viewby, gradereport_singleview{{/str}}</p>
    {{/displaylabel}}
    <div class="btn-group align-items-center" role="group" aria-label="{{#str}}ariareporttype, gradereport_singleview{{/str}}">
        <a href="{{userzerolink}}"
           role="button"
           class="btn btn-outline-primary {{#userselectactive}}active{{/userselectactive}}"
           {{#userselectactive}}aria-pressed="true"{{/userselectactive}}
           {{^userselectactive}}aria-pressed="false"{{/userselectactive}}
        >
            {{#str}}users{{/str}}
        </a>
        <a href="{{gradezerolink}}"
           role="button"
           class="btn btn-outline-primary {{#gradeselectactive}}active{{/gradeselectactive}}"
           {{#gradeselectactive}}aria-pressed="true"{{/gradeselectactive}}
           {{^gradeselectactive}}aria-pressed="false"{{/gradeselectactive}}
        >
            {{#str}}gradeitems, grades{{/str}}
        </a>
    </div>
</div>
