{{!
    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 koperedashboard_backup/delete

    Example context (json):
    {
        "filename": "database-mysql-to-mysql-20260703-101010.sql.gz",
        "filesize": "10MB",
        "sesskey": "abc123",
        "deleteurl": "https://example.com/local/kopere_dashboard/plugins/backup/delete.php?file=x",
        "cancelurl": "https://example.com/local/kopere_dashboard/plugins/backup/"
    }
}}

<div class="kopere_dashboard-card">
    <div class="alert alert-warning" style="margin-bottom: 16px;">
        <h4>{{#str}}delete_confirm_title, koperedashboard_backup{{/str}}</h4>
        <p style="margin-bottom: 0;">{{#str}}delete_confirm_message, koperedashboard_backup{{/str}}</p>
    </div>

    <div class="border rounded p-3" style="margin-bottom: 16px;">
        <p style="margin-bottom: 8px;">
            <strong>{{#str}}col_file, koperedashboard_backup{{/str}}:</strong>
            <code>{{{filename}}}</code>
        </p>
        <p style="margin-bottom: 0;">
            <strong>{{#str}}col_size, koperedashboard_backup{{/str}}:</strong>
            {{{filesize}}}
        </p>
    </div>

    <form method="post" action="{{{deleteurl}}}" style="display: inline-block; margin-right: 8px;">
        <input type="hidden" name="sesskey" value="{{{sesskey}}}">
        <input type="hidden" name="confirm" value="1">
        <button type="submit" class="btn btn-danger">
            {{#str}}delete_confirm_button, koperedashboard_backup{{/str}}
        </button>
    </form>

    <a class="btn btn-secondary" href="{{{cancelurl}}}">
        {{#str}}delete_cancel, koperedashboard_backup{{/str}}
    </a>
</div>
