{{!
    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/>.

    Edwiser RemUI
    @package theme_remui
    @copyright (c) 2023 WisdmLabs (https://wisdmlabs.com/)
    @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
}}
{{!
    @template core/block

    Example context (json):
    {
        "id": "block0",
        "class": "block block_html",
        "showskiplink": true,
        "type": "html",
        "ariarole": "complementary",
        "title": "Test block",
        "blockinstanceid": 1,
        "content": "<p>Hello block world!</p>"
    }
}}
{{! Block Skip Link }}
{{#showskiplink}}
<a href="#sb-{{skipid}}" class="sr-only sr-only-focusable">{{#str}}skipa, access, {{{title}}}{{/str}}</a>
{{/showskiplink}}

{{! Start Block Container }}
<section id="{{id}}"
    class="{{#hidden}}hidden{{/hidden}} {{class}} {{#hascontrols}}block_with_controls{{/hascontrols}} " role="{{ariarole}}" data-block="{{type}}" data-instance-id="{{blockinstanceid}}" {{#arialabel}} aria-label="{{arialabel}}" {{/arialabel}} {{^arialabel}} {{#title}}aria-labelledby="instance-{{blockinstanceid}}-header"{{/title}} {{/arialabel}}>

    {{! Block contents }}
    <div class="block-body-wrapper">
        {{! Block header }}
        <div class="block-header-wrapper d-flex justify-content-between align-items-center">
            {{#title}}
            <h4 id="instance-{{blockinstanceid}}-header" class="block-header" title="{{{title}}} block">{{{title}}}</h4>
            {{/title}}
            {{^title}}<span></span>{{/title}}
            {{#hascontrols}}
            <div class="d-flex flex-gap-1d5 controls-wrapper">
                {{{livecustomizationbtn}}}
                <div class="block-controls header">
                    {{{controls}}}
                </div>
            </div>
            {{/hascontrols}}
        </div>
        <div class="card-text content block-content-area {{^isbodytransparent}}edw-block-body{{/isbodytransparent}}">
            {{{content}}}
            <div class="footer">{{{footer}}}</div>
            {{{annotation}}}
        </div>

    </div>
    {{! End Block Container }}
</section>

{{! Block Skip Link Target }}
{{#showskiplink}}
<span id="sb-{{skipid}}"></span>
{{/showskiplink}}
