{{!
    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 format_onetopic/local/subsectionmodes/collapsible

    List template for subsection mode.

    Example context (json):
    {
    }
}}
{{< core_courseformat/local/content/delegatedsection }}
    {{$ core_courseformat/local/content/section/content }}
        <div class="course-section-header d-flex"
            data-for="section_title"
            data-id="{{id}}"
            data-number="{{num}}"
        >
           {{#header}}
                {{$ core_courseformat/local/content/section/header }}
                    {{> core_courseformat/local/content/section/header }}
                {{/ core_courseformat/local/content/section/header }}
            {{/header}}
        </div>
        <div id="coursecontentcollapseid{{id}}"
            class="content course-content-item-content collapse {{^contentcollapsed}}show{{/contentcollapsed}}">
            <div class="{{#hasavailability}}description{{/hasavailability}} my-3" data-for="sectioninfo">
                {{#isstealth}}
                <div class="alert alert-warning">
                    {{#str}} orphansectionwarning, core_courseformat {{/str}}
                </div>
                {{/isstealth}}
                {{#summary}}
                    {{$ core_courseformat/local/content/section/summary }}
                        {{> core_courseformat/local/content/section/summary }}
                    {{/ core_courseformat/local/content/section/summary }}
                {{/summary}}
                {{#availability}}
                    {{$ core_courseformat/local/content/section/availability }}
                        {{> core_courseformat/local/content/section/availability }}
                    {{/ core_courseformat/local/content/section/availability }}
                {{/availability}}
            </div>
            {{#cmsummary}}
                {{$ core_courseformat/local/content/section/cmsummary }}
                    {{> core_courseformat/local/content/section/cmsummary }}
                {{/ core_courseformat/local/content/section/cmsummary }}
            {{/cmsummary}}
            {{#cmlist}}
                {{$ core_courseformat/local/content/section/cmlist }}
                    {{> core_courseformat/local/content/section/cmlist }}
                {{/ core_courseformat/local/content/section/cmlist }}
            {{/cmlist}}
            {{{cmcontrols}}}
        </div>
    {{/ core_courseformat/local/content/section/content }}
{{/ core_courseformat/local/content/delegatedsection}}
