{{!
    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_studentquiz/question_tabs

    Template for rendering in comment area for studentquiz.

    Example context (json):
    {
        "tabs": [
            {
                "id": "public-tab",
                "name": "Public comments",
                "content": "Public comments' content"
            },{
                "id": "private-tab",
                "name": "Private comments",
                "content": "Private comments' content",
                "active": true
            }
        ]
    }
}}

<div class="studentquiz_behaviour question-nav-tabs">
    <div class="nav nav-tabs" role="tablist">
        {{#tabs}}
            <a
                class="nav-item nav-link {{#active}}active{{/active}}"
                data-bs-toggle="tab"
                data-toggle="tab"
                data-tab-id="{{id}}"
                href="#{{id}}"
                role="tab"
                aria-controls="{{id}}"
                {{#active}}aria-selected="true"{{/active}}{{^active}}aria-selected="false"{{/active}}
            >{{name}}</a>
        {{/tabs}}
    </div>
    <div class="tab-content">
        {{#tabs}}
            <div class="tab-pane {{#active}}active{{/active}}" id="{{id}}" role="tabpanel">{{{content}}}</div>
        {{/tabs}}
    </div>
</div>

{{#js}}
    require(['mod_studentquiz/question_nav_tabs'], function(navTabs) {
        navTabs.init();
    });
{{/js}}
