{{!
    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_remuiformat/list_one_section


    Example context (json):
    {
        "editing: "1/0",
        "defaultview: "1/0",
        "expanded: "1/0",
        "collapsed: "1/0",
        "user_id: "1",
        "courseid: "1",
        "generalsection": [
         {
            "generalsectiontitle" => "General",
            "activities": [
                {
                    "index": "1",
                    "id": "Section Title",
                    "completion": "Single Page URL",
                    "viewurl": "Hidden message",
                    "title" => Chat 1,
                    "modulename" => chat,
                    "summary" => ,
                    "completed" => 0,
                }
            ]
         }
        ],
        "generalsectionsummary": "General section summary",
        "sections": [
            {
                "index": "1",
                "title": "Section Title",
                "singlepageurl": "Single Page URL",
                "hiddenmessage": "Hidden message",
                "summary": "Summary",
                "hidden": "1/0",
                "activityinfostring": "2 Files, 2 Quizzes"
                "sectionactivities" [
                    {
                    }
                ]
            }
        ]
    }
}}

{{#hiddensection}}
    {{{ hiddensection }}}
{{/hiddensection}}
{{^hiddensection}}
    <div id="list-container" class="remui-format-list one-section-format mt-20">
        <ul class="sections p-15 py-2 px-2 p-y-1 p-x-1">
            <li id="section-{{section}}" class="section" aria-labelledby="section-{{section}} .content .summary .title">
                <div class="right side">
                    {{{ optionmenu }}}
                </div>
                <h2 class="section-title">
                    <span class="sno {{^hidden}}text-primary{{/hidden}}{{#hidden}}text-muted{{/hidden}}">
                        {{ section }}&#46;
                    </span>
                    <span class="title m-0 {{#hidden}}text-muted{{/hidden}}">{{{ title }}}</span>
                </h2>
                {{{ summary}}}
                <div class="content">
                    <div class="summary">
                    </div>
                    <div class="activities-list">
                        {{{ activities }}}
                    </div>
                </div>
                {{{ addnewactivity }}}
            </li>
            {{#sections}}
            <li id="section-{{index}}" class="section hide">
                <div class="content">
                    <div class="sectionname">
                        <h2>
                            {{name}}
                        </h2>
                    </div>
                    <div class="summary">

                    </div>
                </div>
            </li>
            {{/sections}}
        </ul>
    </div>
    <!-- next/prev sections -->
    <div class="col-md-12 p-0 wdm-card-section m-t-2">
        <div class="card-section-leftnav">
            {{{ leftnav }}}
        </div>
        <div class="card-section-rightnav">
            {{{ rightnav }}}
        </div>
    </div>
{{/hiddensection}}
