{{!
    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_sections_summary


    Example context (json):
    {
        "sections": [
            {
                "index": "1",
                "title": "Section Title",
                "singlepageurl": "Single Page URL",
                "hiddenmessage": "Hidden message",
                "summary": "Summary",
                "hidden": "1/0",
                "activityinfostring": "2 Files, 2 Quizzes"
                "sectionactivities" [
                    {
                    }
                ]
            }
        ]
    }
}}

{{#addsection}}
<li id="{{divid}}" class="card clearfix mb-4 m-b-2" role="region" style="">
   <div class="content card-block px-15 px-3 py-10 py-2 remui-list-content-border d-flex align-items-center">
      {{#numsections}}
         <a href="{{{addurl}}}" class="{{addurlclass}}">{{{addicon}}} {{{straddsection}}}</a>

         {{#strremovesection}}
         <a href="{{{removeurl}}}" class="{{removeurlclass}}">{{{removeicon}}} {{{strremovesection}}}</a>
         {{/strremovesection}}
      {{/numsections}}

      {{^numsections}}
         <a href="{{{url}}}" data-add-sections="{{{straddsections}}}">{{{icon}}} {{{straddsections}}}</a>
      {{/numsections}}
   </div>
</li>
{{/addsection}}

{{^addsection}}
<li id="section-{{{index}}}" class="card section clearfix mb-4" role="region" aria-labelledby="section-{{index}} .sectionname a:not(.quickeditlink)">
   <div class="content card-block px-15 py-15 py-3 px-3 remui-list-content-border" aria-labelledby="section-{{index}} .sectionname a:not(.quickeditlink)">
      {{#highlighted}}<div class="highlight bg-primary"></div>{{/highlighted}}
      <div class="d-block">
        <div class="left side float-left">
          {{{ leftside }}}
        </div>
         <div class="right side float-right d-flex">
           {{{ addnewsection }}}
           {{{ optionmenu }}}
         </div>
         {{{leftside}}}
      </div>
      <h4 class="sectionname card-title">
         {{#editing}}
            {{{ title }}}
         {{/editing}}
         {{^editing}}
            <a class="panel-title p-0" href="{{{ singlepageurl }}}" aria-expanded="{{#collapsed}}false{{/collapsed}}{{#expanded}}true{{/expanded}}" aria-controls="sectionwrapper-{{{index}}}">{{{ title }}}
            {{#progressinfo}}
               {{#completed}}
                  <!-- Default checked -->
                  <div class="float-right">
                     <i class="fa fas fa-check-square text-success"></i>
                     <!-- {{{ progress }}} -->
                  </div>
               {{/completed}}
            {{/progressinfo}}
            </a>
         {{/editing}}
      </h4>
      {{{ hiddenmessage }}}
      <div class="summary card-text {{#expanded}}hide{{/expanded}}">{{{summary}}}</div>
      {{#availability}}
      <div class="section_availability badge badge-pill badge-info mb-10">
        {{{availability}}}
      </div>
      {{/availability}}
      <div class="section-summary-activities mdl-right {{#expanded}}hide{{/expanded}}">{{{activityinfostring}}}</div>
   </div>
</li>
{{/addsection}}
