{% extends "error_base.html.j2" %}

{% block title %}Plugin Load Error — {{ plugin_name }}{% endblock %}

{% block content %}
<div class="card card-md">
    <div class="card-body text-center py-4">
        <div class="mb-3">
            <i class="ti ti-alert-triangle icon icon-lg text-danger"></i>
        </div>
        <h1 class="mt-3">Plugin "{{ plugin_name }}" failed to load</h1>
        {% for error in errors %}
        <p class="text-secondary mt-2">{{ error }}</p>
        {% endfor %}
    </div>
    {% if tracebacks %}
    <div class="card-body border-top">
        <details>
            <summary class="text-muted cursor-pointer">Traceback</summary>
            {% for tb in tracebacks %}
            <pre class="text-muted small mt-2 mb-0" style="white-space: pre-wrap;">{{ tb }}</pre>
            {% endfor %}
        </details>
    </div>
    {% endif %}
    <div class="card-footer text-center">
        <a href="{{ admin_url }}" class="btn btn-primary">
            <i class="ti ti-settings me-1"></i> Go to admin overview
        </a>
    </div>
</div>
{% endblock %}
