{% extends 'base.html.twig' %}

{% block title %}Verification attestation - E-Ticket{% endblock %}

{% block body %}
<div class="page-container-md">
    <h1 class="text-3xl font-black uppercase tracking-tighter italic heading-page">Verification attestation</h1>
    <p class="font-bold text-gray-500 italic mb-8">Ce document a ete verifie par la plateforme E-Ticket.</p>

    <div class="card-brutal-green mb-8">
        <p class="font-black text-sm mb-2">Attestation authentique</p>
        <p class="text-sm text-gray-700">Ce document correspond a un virement enregistre dans notre systeme.</p>
    </div>

    <div class="card-brutal">
        <table class="table-brutal">
            <thead>
                <tr class="border-b-2 border-gray-200">
                    <th class="text-[10px] font-black uppercase tracking-widest text-gray-400">Detail</th>
                    <th class="text-[10px] font-black uppercase tracking-widest text-gray-400">Valeur</th>
                </tr>
            </thead>
            <tbody>
                <tr><td class="font-bold text-sm text-gray-400">Reference</td><td class="text-sm font-mono">{{ payout.stripePayoutId }}</td></tr>
                <tr><td class="font-bold text-sm text-gray-400">Montant</td><td class="text-sm font-bold">{{ payout.amountDecimal|number_format(2, ',', ' ') }} {{ payout.currency|upper }}</td></tr>
                <tr>
                    <td class="font-bold text-sm text-gray-400">Statut</td>
                    <td>
                        {% if payout.status == 'paid' %}
                            <span class="badge-green text-xs font-black uppercase">{{ payout.status }}</span>
                        {% elseif payout.status == 'failed' or payout.status == 'canceled' %}
                            <span class="badge-red text-xs font-black uppercase">{{ payout.status }}</span>
                        {% else %}
                            <span class="badge-yellow text-xs font-black uppercase">{{ payout.status }}</span>
                        {% endif %}
                    </td>
                </tr>
                <tr><td class="font-bold text-sm text-gray-400">Beneficiaire</td><td class="text-sm">{{ payout.organizer.companyName ?? (payout.organizer.firstName ~ ' ' ~ payout.organizer.lastName) }}</td></tr>
                <tr><td class="font-bold text-sm text-gray-400">Date d'arrivee</td><td class="text-sm">{{ payout.arrivalDate ? payout.arrivalDate|date('d/m/Y') : '—' }}</td></tr>
                <tr><td class="font-bold text-sm text-gray-400">Date de creation</td><td class="text-sm">{{ payout.createdAt|date('d/m/Y H:i') }}</td></tr>
            </tbody>
        </table>
    </div>
</div>
{% endblock %}
