{% extends 'base.html' %}
{% load static i18n %}

{% block title %}{% trans "Mark All as Read" %} - ATS{% endblock %}

{% block content %}
<div class="container-fluid py-4">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-body text-center p-5">
                    <div class="mb-4">
                        <i class="fas fa-check-double fa-3x text-success"></i>
                    </div>

                    <h4 class="mb-3">{{ title }}</h4>
                    <p class="text-muted mb-4">{{ message }}</p>

                    {% if unread_count > 0 %}
                        <div class="alert alert-info mb-4">
                            <h6 class="alert-heading">
                                <i class="fas fa-info-circle me-2"></i>{% trans "What this will do" %}
                            </h6>
                            <p class="mb-2">
                                {% blocktrans count count=unread_count %}
                                    This will mark {{ count }} unread notification as read.
                                {% plural %}
                                    This will mark all {{ count }} unread notifications as read.
                                {% endblocktrans %}
                            </p>
                            <p class="mb-0">
                                {% trans "You can still view all notifications in your notification list, but they won't appear as unread." %}
                            </p>
                        </div>
                    {% else %}
                        <div class="alert alert-success mb-4">
                            <h6 class="alert-heading">
                                <i class="fas fa-check-circle me-2"></i>{% trans "All caught up!" %}
                            </h6>
                            <p class="mb-0">
                                {% trans "You don't have any unread notifications to mark as read." %}
                            </p>
                        </div>
                    {% endif %}

                    {% if unread_count > 0 %}
                        <form method="post" class="d-inline">
                            {% csrf_token %}
                            <button type="submit" class="btn btn-success">
                                <i class="fas fa-check-double me-1"></i> {% trans "Yes, Mark All as Read" %}
                            </button>
                            <a href="{{ cancel_url }}" class="btn btn-outline-secondary">
                                <i class="fas fa-times me-1"></i> {% trans "Cancel" %}
                            </a>
                        </form>
                    {% else %}
                        <a href="{{ cancel_url }}" class="btn btn-primary">
                            <i class="fas fa-arrow-left me-1"></i> {% trans "Back to Notifications" %}
                        </a>
                    {% endif %}
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
