{% extends "layouts/base.html" %}
{% load i18n %}

{% block title %}{% trans "Delete Template" %} - PX360{% endblock %}

{% block content %}
<div class="container-fluid">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card border-danger">
                <div class="card-header bg-danger text-white">
                    <h5 class="mb-0">
                        <i class="bi bi-exclamation-triangle me-2"></i>
                        {% trans "Delete Template" %}
                    </h5>
                </div>
                <div class="card-body">
                    <p class="mb-3">
                        {% trans "Are you sure you want to delete this project template?" %}
                    </p>
                    
                    <div class="alert alert-secondary">
                        <strong>{% trans "Template:" %}</strong> {{ template.name }}<br>
                        {% if template.hospital %}
                        <strong>{% trans "Hospital:" %}</strong> {{ template.hospital.name }}
                        {% else %}
                        <strong>{% trans "Scope:" %}</strong> {% trans "Global (All Hospitals)" %}
                        {% endif %}
                    </div>
                    
                    <p class="text-danger mb-4">
                        <strong>{% trans "This action cannot be undone." %}</strong>
                    </p>
                    
                    <form method="post">
                        {% csrf_token %}
                        <div class="flex gap-3">
                            <button type="submit" class="px-6 py-3 bg-red-600 text-white rounded-xl font-bold text-sm hover:bg-red-700 transition inline-flex items-center gap-2">
                                <i data-lucide="trash-2" class="w-4 h-4"></i> {% trans "Delete Template" %}
                            </button>
                            <a href="{% url 'projects:template_list' %}" class="px-6 py-3 border-2 border-slate-200 rounded-xl font-semibold text-slate-600 hover:bg-slate-50 transition text-sm inline-flex items-center gap-2">
                                {% trans "Cancel" %}
                            </a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
