{{!
    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 core_enrol/enrol_page

    Recommended template for displaying the enrolment plugin call-to-action on the enrol/index.php page.

    Usually to be used with the \core_enrol\output\enrol_page and returned from the enrol_plugin::enrol_page_hook()

    Example context (json):
    {
        "enrol": "fee",
        "instanceid": 1,
        "extraattributes": [{
            "name": "data-action",
            "value": "remove-enrolment-option"
        }],
        "header": "Enrolment on payment",
        "body": "This course requires a payment to enrol.",
        "hasbuttons": true,
        "buttons": [{
            "method" : "get",
            "id": "buttonid-123",
            "type": "primary",
            "url" : "#",
            "label" : "Purchase access"
        }]
    }
}}
<div class="box generalbox enrol-instance enrol-instance--{{enrol}}"
    data-enrol="{{enrol}}"
    data-instanceid="{{instanceid}}"
    {{#extraattributes}}{{name}}="{{value}}" {{/extraattributes}}
    {{#header}}role="region" aria-labelledby="enrol-heading-{{enrol}}-{{instanceid}}"{{/header}}
>
    <div class="card enrol-card h-100">
        {{#header}}
        <div class="card-header enrol-card__header">
            {{$headercontent}}
                <h4 id="enrol-heading-{{enrol}}-{{instanceid}}" class="enrol-card__title mb-0">
                    {{{header}}}
                </h4>
            {{/headercontent}}
        </div>
        {{/header}}
        {{#body}}
        <div class="card-body enrol-card__body">
            {{{body}}}
        </div>
        {{/body}}
        {{#hasbuttons}}
        <div class="card-footer enrol-card__footer">
            {{#buttons}}
                {{> core/single_button }}
            {{/buttons}}
        </div>
        {{/hasbuttons}}
    </div>
</div>
