{% extends "@FerienpassAdmin/layout/modalBase.html.twig" %}

{% block main %}

    {% embed '@FerienpassAdmin/fragment/deleteModal.html.twig' with {
        metadata: {
            name: '{{ item.name }}',
            accounts: '{{ item.users|map(u => "#{u.firstname} #{u.lastname}")|join(", ") }}',
            numberOffers: '{{ item.offers|length }}'
        }
    } %}

        {% block content %}
            {% if item.users|length %}
                <div class="mt-2 flex">
                    <div class="flex-shrink-0">
                        <twig:ux:icon name="ph:info" class="h-5 w-5 text-blue-600 dark:text-blue-500" aria-hidden="true" />
                    </div>
                    <div class="ml-2">
                        <p class="text-sm text-blue-700 dark:text-blue-400">
                            Die {{ item.users|length }} Nutzeraccounts bleiben erhalten.
                        </p>
                    </div>
                </div>
            {% endif %}
            {% if item.offers|length %}
                <div class="mt-2 flex">
                    <div class="flex-shrink-0">
                        <twig:ux:icon name="ph:info" class="h-5 w-5 text-blue-600 dark:text-blue-500" aria-hidden="true" />
                    </div>
                    <div class="ml-2">
                        <p class="text-sm text-blue-700 dark:text-blue-400">
                            Die {{ item.offers|length }} Angebote bleiben erhalten.
                        </p>
                    </div>
                </div>
            {% endif %}

        {% endblock %}

    {% endembed %}

{% endblock %}
