{{!
    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 theme_foundation/partials/carousel

    Carousel.

    Context variables required for this template:
    * carouselid - Carousel any.

    Example context (json):
    {
        "carouselid": false
    }
}}
{{#carouselid}}
<div id="{{carouselid}}" class="carousel slide">
    <ol class="carousel-indicators">
        {{#carouselindicators}}
        <li data-target="#{{carouselid}}" data-slide-to="{{indicatornumber}}"{{#indicatoractive}} class="active"{{/indicatoractive}}></li>
        {{/carouselindicators}}
    </ol>
    <div class="carousel-inner container-fluid">
        {{#carouselslides}}
        <div class="carousel-item{{#slideactive}} active{{/slideactive}}">
            <div class="row the-slide">
                <div class="col-xs-5 the-slide-caption">
                    <h5>{{slidetitle}}</h5>
                    <div>{{{slidecaption}}}</div>
                </div>
                <div class="col-xs-7 the-slide-image-container">
                    <img src="{{slideimage}}" class="the-slide-image" alt="{{slideimagetext}}">
                </div>
            </div>
        </div>
        {{/carouselslides}}
    </div>
    <a class="carousel-control carousel-control-prev" href="#{{carouselid}}" role="button" data-slide="prev">
        <span class="fa fa-chevron-circle-left" aria-hidden="true"></span>
        <span class="sr-only">{{#str}}previous{{/str}}</span>
    </a>
    <a class="carousel-control carousel-control-next" href="#{{carouselid}}" role="button" data-slide="next">
        <span class="fa fa-chevron-circle-right" aria-hidden="true"></span>
        <span class="sr-only">{{#str}}next{{/str}}</span>
    </a>
</div>
{{#js}}
require(['jquery', 'theme_boost/bootstrap/carousel'], function($) {
    $('#{{carouselid}}').carousel();
});
{{/js}}
{{/carouselid}}
