{{!
    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 mod_booking/bookingpage/prepagemodal

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-region

    Example context (json):
    {
        "optionid": "3",
        "userid": "1212",
        "uniquid": "0UEEoHJkKhrK0QdG",
        "totalnumberofpages": "3",
        "description": "My Text",
        "buttonhtml": "button HTML"
    }
}}
<div data-toggle="modal" data-bs-toggle="modal"
    data-target="#sbPrePageModal_{{optionid}}_{{uniquid}}" data-bs-target="#sbPrePageModal_{{optionid}}_{{uniquid}}">
    {{{buttonhtml}}}
</div>

<div class="modal fade" id="sbPrePageModal_{{optionid}}_{{uniquid}}" tabindex="-1" role="dialog"
    aria-label="sbPrePageModalLabel" aria-hidden="true"
    data-uniquid="{{uniquid}}"
    data-optionid="{{optionid}}"
    data-userid="{{userid}}"
    data-pages="{{totalnumberofpages}}">
    <div class="modal-dialog modal-xl" role="document">
        <div class="modal-content">
            <div class="modal-body prepage-body">
                <div class="modalHeader row"></div>
                <div class="modalMainContent row"></div>
                <div class="modalButtonAreaContainer row d-flex justify-content-center">
                    <div class="modalButtonArea w-25"></div>
                </div>
                <div class="modalFooter row"></div>
            </div>
        </div>
    </div>
</div>

{{#js}}
    require(['mod_booking/bookit'], function(init) {
        init.initprepagemodal({{optionid}}, {{userid}}, {{totalnumberofpages}}, '{{uniquid}}');
    });
{{/js}}