{{!
    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/col_coursestarttime

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-region

    Example context (json):
    {
        "showcollapsebtn" : true,
        "optionid" : "1",
        "datestrings" : [
            {
                "key" : [
                    {
                        "datestring" : "3 March 2023, 10:30 AM - 11:45 AM"
                    }
                ]
            }
        ]
    }
}}
{{^selflearningcourse}}{{#datesexist}}
<div class="booking-showdates-area">
{{#showcollapsebtn}}
    <div class='booking-showdates-collapse mt-1'>
        <span>
            <i class="fa fa-calendar fa-fw" aria-hidden="true"></i>
        </span>
        <span>
            <a
                data-toggle="collapse"
                data-bs-toggle="collapse"
                href="#optiondates{{{optionid}}}"
                role="button"
                aria-expanded="false"
                aria-controls="optiondates{{{optionid}}}">
                {{#str}}showdates, mod_booking{{/str}}
            </a>
        </span>
    </div>
    <div class="collapse" id="optiondates{{{optionid}}}">
        {{#dates}}
        <div>
            {{{datestring}}}
            {{> mod_booking/optiondates_extrainfo }}
        </div>
        {{/dates}}
    </div>
{{/showcollapsebtn}}
{{^showcollapsebtn}}
    {{#dates.0}}
        <div id="optiondates{{{optionid}}}">
            <div class='booking-showdates-title'>
                <span>
                    <i class="fa fa-calendar fa-fw" aria-hidden="true"></i>
                </span>
                <span><b>{{#str}} dates, mod_booking {{/str}}:</b></span>
            </div>
            {{#dates}}
            <div>
                {{{datestring}}}
                {{> mod_booking/optiondates_extrainfo }}
            </div>
            {{/dates}}
        </div>
    {{/dates.0}}
{{/showcollapsebtn}}
</div>
{{/datesexist}}{{/selflearningcourse}}
{{#selflearningcourseshowdurationinfo}}
    <i class="fa fa-fw fa-clock-o" aria-hidden="true"></i>&nbsp;
    {{^timeremaining}}
        {{#str}}selflearningcoursedurationinfo, mod_booking, {{duration}}{{/str}}
    {{/timeremaining}}
    {{#timeremaining}}
        {{#str}}selflearningcoursetimeremaininginfo, mod_booking, {{timeremaining}}{{/str}}
    {{/timeremaining}}
{{/selflearningcourseshowdurationinfo}}
{{#selflearningcourseshowdurationinfoexpired}}
    <i class="fa fa-fw fa-clock-o" aria-hidden="true"></i>&nbsp;
    {{#str}} selflearningcoursetimeremaininginfoexpired, booking {{/str}}
{{/selflearningcourseshowdurationinfoexpired}}
