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

{% block title %}{% trans "Delete QI Project" %} - 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 QI Project" %}
                    </h5>
                </div>
                <div class="card-body">
                    <p class="mb-3">
                        {% trans "Are you sure you want to delete this QI Project?" %}
                    </p>
                    
                    <div class="alert alert-secondary">
                        <strong>{% trans "Project:" %}</strong> {{ project.name }}<br>
                        <strong>{% trans "Hospital:" %}</strong> {{ project.hospital.name }}<br>
                        <strong>{% trans "Status:" %}</strong> {{ project.get_status_display }}
                    </div>
                    
                    {% if project.tasks.count > 0 %}
                    <div class="alert alert-warning">
                        <i class="bi bi-info-circle me-1"></i>
                        {% blocktrans with count=project.tasks.count %}
                            This project has {{ count }} task(s) that will also be deleted.
                        {% endblocktrans %}
                    </div>
                    {% endif %}
                    
                    <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 Project" %}
                            </button>
                            <a href="{% url 'projects:project_detail' pk=project.pk %}" 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 %}
