{{!
    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_booking/semesters_holidays

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-region

    Example context (json):
    [
        {
            "renderedchangesemesterform": "HTML form",
            "renderedholidaysform": "HTML form",
            "existingsemesters": "json",
            "existingholidays": "json"
        }
    ]
}}
<div class="alert alert-secondary alert-dismissible fade show" role="alert">
  {{#str}} semesterssubtitle, mod_booking {{/str}}
  <button type="button" class="btn-close" data-dismiss="alert" data-bs-dismiss="alert" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  </button>
</div>
<nav>
  <div class="nav nav-tabs" id="nav-tab" role="tablist">
    <a class="nav-link {{^renderedchangesemesterform}}active{{/renderedchangesemesterform}}" id="semesters-tab" data-toggle="tab" data-bs-toggle="tab" href="#semestersform" role="tab" aria-controls="semestersform" aria-selected="true">
      {{#str}} semesters, mod_booking {{/str}}
    </a>
    <a class="nav-link" id="holidays-tab" data-toggle="tab" data-bs-toggle="tab" href="#holidaysform" role="tab" aria-controls="holidaysform" aria-selected="false">
      {{#str}} holidays, mod_booking {{/str}}
    </a>
    {{#renderedchangesemesterform}}
    <a class="nav-link active" id="changesemester-tab" data-toggle="tab" data-bs-toggle="tab" href="#changesemesterform" role="tab" aria-controls="changesemesterform" aria-selected="false">
      {{#str}} changesemester, mod_booking {{/str}}
    </a>
    {{/renderedchangesemesterform}}
  </div>
</nav>
<div class="tab-content" id="nav-tabContent">
  <div data-region="semestersformcontainer" data-data="{{{existingsemesters}}}" class="tab-pane fade {{^renderedchangesemesterform}}show active{{/renderedchangesemesterform}}" id="semestersform" role="tabpanel" aria-labelledby="semesters-tab">
    {{{ renderedsemestersform }}}
  </div>
  <div data-region="holidaysformcontainer" data-data="{{{existingholidays}}}" class="tab-pane fade" id="holidaysform" role="tabpanel" aria-labelledby="holidays-tab">
    {{{ renderedholidaysform }}}
  </div>
  {{#renderedchangesemesterform}}
    <div data-region="changesemestercontainer" class="tab-pane fade show active" id="changesemesterform" role="tabpanel" aria-labelledby="changesemester-tab">
      {{{ renderedchangesemesterform }}}
    </div>
  {{/renderedchangesemesterform}}
</div>
