{{!
    This file is part of Moodle - https://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 local_kopere_dashboard/html-button_icon

    Example context (json):
    {
        "button_id": "65f1b6d4a9c01",
        "config": {
            "wwwroot": "https://moodle.example.com"
        },
        "icon": "delete",
        "confirmtitle": "Are you sure?",
        "confirmtext": "Do you really want to delete this item? This action cannot be undone.",
        "link": "https://moodle.example.com/local/kopere_dashboard/plugins/pages/page_delete.php?id=12"
    }
}}

<span id="btn-{{button_id}}" style="display:none">
    <img src="{{{config.wwwroot}}}/local/kopere_dashboard/assets/dashboard/img/actions/{{{icon}}}.svg"
         width="19"
         alt="{{{icon}}}">
</span>

<div id="confirm-{{{button_id}}}" class="confirm-dialog"
     style="display:none;min-width: 400px;"
     title="{{confirmtitle}}">
    <p class="text-center">{{confirmtext}}</p>
</div>
