{% extends "@FerienpassAdmin/layout/base.html.twig" %}
{% trans_default_domain 'admin' %}

{% block main %}

    <twig:Admin:PageHeader title="email_delivery_errors.title" subtitle="Prüfen Sie, welche E-Mail-Adressen Fehlermeldungen produzieren." />

    <div class="-ml-3 mt-6">
        <nav class="flex overflow-hidden" aria-label="">

            <a href="{{ path('email_delivery_errors') }}"
               class="text-gray-500 dark:text-gray-100/50 hover:text-gray-700 dark:hover:text-gray-100/80 rounded-md px-3 py-2 whitespace-nowrap text-sm font-medium"
               >
                <span>E-Mails mit Fehlern</span>
            </a>

            <a href="{{ path('blocked_contacts') }}"
               class="bg-gray-100 dark:bg-gray-900 text-gray-700 dark:text-gray-100/80 rounded-md px-3 py-2 whitespace-nowrap text-sm font-medium"
               aria-current="page"
            >
                <span>Blockierte Accounts</span>
            </a>

        </nav>
    </div>


{{ component('Admin:SearchableQueryableList', {
        qb: qb,
        routeName: app.current_route,
        routeParameters: app.current_route_parameters|merge(app.request.query.all),
        viewKey: 'admin_blockedContacts',
        viewPathPrefix: '/admin/abgemeldete-kontakte',
        config: {
            title: '

<span class="flex items-center space-x-2">
<span>{{ item.name|default("") }}</span>

{% if item.isMember %}
    {{ component("Admin:Badge", { color: "gray", content: "Eltern" }) }}
{% endif %}
{% if item.isHost %}
    {{ component("Admin:Badge", { color: "gray", content: "Veranstaltende" }) }}
{% endif %}
{% if item.isAdmin %}
    {{ component("Admin:Badge", { color: "red", content: "Admin" }) }}
{% endif %}
{% if item.disabled %}
    <div class="flex-none rounded-full bg-red-500/20 p-1" title="deaktiviert">
      <div class="size-1.5 rounded-full bg-red-500"></div>
    </div>
{% endif %}
{% if item.blockedEmail %}
    <div class="flex-none rounded-full bg-orange-500/20 p-1" title="von Emails abgemeldet">
      <div class="size-1.5 rounded-full bg-orange-500"></div>
    </div>
{% endif %}
</span>
',
            info: [
                'registriert am {{ item.createdAt|default ? item.createdAt|format_date : "" }}'
            ]
        }
    }) }}

{% endblock %}
