{{!
    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 enrol/enrolment_options

    This template will render information about available course enrolment options.

    Context variables required for this template:
    * heading      - Page heading
    * courseinfobox - Course information box (raw HTML)
    * widgets      - Array of enrolment option widgets (raw HTML strings)
    * message      - Message shown when no enrolment options are available
    * continuebutton - Continue button HTML shown alongside the message

    Example context (json):
    {
        "heading": "Enrolment options",
        "courseinfobox": "<div>Course Information</div>",
        "widgets": ["<div>Widget 1</div>"],
        "message": "Guests cannot access this course. Please log in.",
        "continuebutton": "<a href=\"#\">Continue</a>"
    }
}}
<div class="enrol-page-layout">
    <div class="enrol-page-layout__heading">
        <h2 class="enrol-page-layout__title mb-0">{{heading}}</h2>
    </div>
    <div class="enrol-page-layout__courseinfo">
        {{{courseinfobox}}}
    </div>
    <div class="enrol-page-layout__options">
        {{#widgets}}
            <div class="enrol-page-layout__widget py-3">{{{.}}}</div>
        {{/widgets}}
        {{^widgets}}
            <div class="enrol-page-layout__notice alert alert-secondary" role="alert">
                <p class="mb-2">{{message}}</p>
                {{{continuebutton}}}
            </div>
        {{/widgets}}
    </div>
</div>
