{{!
    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_boost_union/offcanvas

    Boost Union offcanvas drawer template.

    Example context (json):
    {
        "regions": [
            {
                "offcanvas": [
                    {
                        "hasblocks": true
                    }
                ],
                "offcanvasleft": [
                    {
                        "hasblocks": true,
                        "addblockbutton": "<div class='add_block_button'><a href='#' class='btn btn-link block-add text-start mb-3'><i class='fa fa-plus py-2 me-3'></i>Add a block</a></div>",
                        "regionhtml": "<aside id='block-region-offcanvas-left' class='block-region'></aside>"
                    }
                ],
                "offcanvascenter": [
                    {
                        "hasblocks": true,
                        "addblockbutton": "<div class='add_block_button'><a href='#' class='btn btn-link block-add text-start mb-3'><i class='fa fa-plus py-2 me-3'></i>Add a block</a></div>",
                        "regionhtml": "<aside id='block-region-offcanvas-center' class='block-region'></aside>"
                    }
                ],
                "offcanvasright": [
                    {
                        "hasblocks": true,
                        "addblockbutton": "<div class='add_block_button'><a href='#' class='btn btn-link block-add text-start mb-3'><i class='fa fa-plus py-2 me-3'></i>Add a block</a></div>",
                        "regionhtml": "<aside id='block-region-offcanvas-right' class='block-region'></aside>"
                    }
                ]
            }
        ]
    }
}}

{{#regions.offcanvas.hasblocks}}
    <div class="row">
        {{#regions.offcanvasleft.hasblocks}}
            <section id="theme-block-region-offcanvas-left" class="theme-block-region {{regions.offcanvas.class}}" aria-label="{{#str}}blocks{{/str}}">
                {{{ regions.offcanvasleft.addblockbutton }}}
                {{{ regions.offcanvasleft.regionhtml }}}
            </section>
        {{/regions.offcanvasleft.hasblocks}}
        {{#regions.offcanvascenter.hasblocks}}
            <section id="theme-block-region-offcanvas-center" class="theme-block-region {{regions.offcanvas.class}}" aria-label="{{#str}}blocks{{/str}}">
                {{{ regions.offcanvascenter.addblockbutton }}}
                {{{ regions.offcanvascenter.regionhtml }}}
            </section>
        {{/regions.offcanvascenter.hasblocks}}
        {{#regions.offcanvasright.hasblocks}}
            <section id="theme-block-region-offcanvas-right" class="theme-block-region {{regions.offcanvas.class}}" aria-label="{{#str}}blocks{{/str}}">
                {{{ regions.offcanvasright.addblockbutton }}}
                {{{ regions.offcanvasright.regionhtml }}}
            </section>
        {{/regions.offcanvasright.hasblocks}}
    </div>
{{/regions.offcanvas.hasblocks}}
