{{!
    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 local_dttutor/error_modal_body

    Error modal body template for Tutor-IA

    Context variables required for this template:
    * message - Error message to display
    * has_config_url - Boolean indicating if configuration URL is present
    * config_url - Configuration URL (only if has_config_url is true)
    * str_configure_now - Localized "Configure Now" string

    Example context (json):
    {
        "message": "The Datacurso AI Provider webservice needs to be configured.",
        "has_config_url": true,
        "config_url": "http://localhost/ai/provider/datacurso/admin/webservice_config.php",
        "str_configure_now": "Configure Now"
    }
}}
<div class="tutor-ia-error-modal">
    <div class="alert alert-warning">
        <i class="fa fa-exclamation-triangle"></i>
        <span>{{message}}</span>
    </div>
    {{#has_config_url}}
    <div class="mt-3">
        <a href="{{config_url}}" class="btn btn-primary" target="_blank">
            <i class="fa fa-cog"></i> {{str_configure_now}}
        </a>
    </div>
    {{/has_config_url}}
</div>
