{{!
    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_forum/local/grades/local/grader/navigation

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-action="togglefullscreen"
    * data-action="closegrader"
    * data-action="savegrade"
    * data-action="expandgrader"

    Context variables required for this template:
    * moduleName: The name of the module this grading interface is for i.e. "Chef the Forum"

    Example context (json):
    {
        "moduleName": "Chef the Forum"
    }
}}
<nav id="nav-container-{{uniqid}}" class="grader-grading_navigation navbar px-0 px-sm-3" aria-label="{{#str}} forumgradingnavigation, mod_forum {{/str}}">
    <div class="container-fluid p-0">
        <div class="d-none d-sm-flex align-items-center">
            <a href="{{{courseUrl}}}" class="btn btn-link px-2 colour-inherit">
                <h5 class="d-inline px-0 mb-0">{{courseName}}</h5>
            </a>
            <span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
            <button class="btn btn-link px-2 colour-inherit" data-action="closegrader">
                <h5 class="d-inline px-0 mb-0">{{moduleName}}</h5>
            </button>
            <span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
            <h5 class="d-inline px-2 mb-0 fw-bold">{{#str}}grading, forum{{/str}}</h5>
        </div>

        <div class="ms-1 ms-sm-auto">
            <button
                class="btn btn-icon drawer-button me-1 active"
                data-action="expand-grading-drawer"
                aria-controls="grading-drawer-{{uniqid}}"
                aria-expanded="true"
                type="button"
                title="{{#str}} showgraderpanel, mod_forum {{/str}}"
            >
                <span class="dir-ltr-hide" aria-hidden="true">{{#pix}} show-grader-panel-rtl, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
                <span class="dir-rtl-hide" aria-hidden="true">{{#pix}} show-grader-panel, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
            </button>
            <button
                class="btn btn-icon drawer-button me-1 d-none d-sm-inline-block"
                aria-label="{{#str}} hidegraderpanel, mod_forum {{/str}}"
                data-action="collapse-grading-drawer"
                aria-controls="grading-drawer-{{uniqid}}"
                aria-expanded="true"
                type="button"
                title="{{#str}} hidegraderpanel, mod_forum {{/str}}"
            >
                <span aria-hidden="true">{{#pix}} hide-grader-panel, mod_forum, {{#str}} hidegraderpanel, mod_forum {{/str}} {{/pix}}</span>
            </button>
            <button
                class="btn btn-primary fw-bold ms-sm-2 px-4"
                data-action="savegrade"
            >
                {{#str}} save {{/str}}
            </button>
            <button
                class="btn btn-secondary fw-bold ms-1 ms-sm-2 px-4"
                aria-label="{{#str}} closegrader, mod_forum {{/str}}"
                data-action="closegrader"
                type="button"
            >
                {{#str}} close, mod_forum {{/str}}
            </button>
            <div class="btn-group d-none d-sm-inline-block">
                <button
                    class="btn btn-icon text-muted icon-no-margin icon-size-3 ms-2"
                    type="button"
                    id="grader-actions-menu-{{uniqid}}"
                    data-bs-toggle="dropdown"
                    aria-haspopup="true"
                    aria-expanded="false"
                    aria-label="{{#str}} actionsforgraderinterface, mod_forum {{/str}}"
                >
                    {{#pix}} i/menu, core {{/pix}}
                </button>
                <div class="dropdown-menu dropdown-menu-end" aria-labelledby="grader-actions-menu-{{uniqid}}">
                    <button
                        class="dropdown-item"
                        type="button"
                        data-action="togglefullscreen"
                        type="button"
                    >
                        {{#str}} togglefullscreen, mod_forum {{/str}}
                    </button>
                </div>
            </div>
        </div>
    </div>
</nav>
