{% trans_default_domain 'admin' %}
{% set translationPrefix = translationPrefix|default(app.request.get('_route')|default('')|split('_')[1]|default('base')) %}

<div class="sm:flex sm:items-start" data-modal-hide-close>
    <div class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 dark:bg-red-600/70 sm:mx-0 sm:h-10 sm:w-10">
        <span class="block h-6 w-6 text-red-600 dark:text-red-100/90"><twig:ux:icon name="ph:warning" /></span>
    </div>
    <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
        <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"
            id="modal-headline">{{ modalHeadline|default("#{translationPrefix}.deleteModal.headline")|trans({}, 'admin') }}</h3>
        <div class="mt-2">
            <p class="text-sm leading-5 text-gray-500 dark:text-gray-300">
                {{ modalConfirm|default("#{translationPrefix}.deleteModal.confirm")|trans({}, 'admin') }}
            </p>

            {% if metadata|default([]) is not empty %}
            <div class="mt-6">
                {% include '@FerienpassAdmin/fragment/_modal_dl.html.twig' %}
            </div>
            {% endif %}

            {% block content %}{% endblock %}

        </div>
    </div>
</div>
<div class="mt-5 sm:mt-4 sm:ml-10 sm:flex sm:pl-4 sm:gap-3">

    {{ form_start(form) }}

    <twig:Admin:Button type="submit" variant="destructive" class="w-full sm:w-auto justify-center">
        {{ modalSubmit|default("#{translationPrefix}.deleteModal.submit")|trans({}, 'admin') }}
    </twig:Admin:Button>

    {{ form_end(form) }}

    <form method="dialog">
        <twig:Admin:Button type="submit" class="mt-3 sm:mt-0 w-full sm:w-auto justify-center">
            Abbrechen
        </twig:Admin:Button>
    </form>
</div>
