{% extends '@Contao/fragment/_container.html.twig' %}

{% block container %}

    <div class="py-6">
        {% if 1 == status %}

            <div x-data=""
                 x-init="$nextTick(() => { $dispatch('modal:open', { url: '{{ path('cms_pay_check') }}', rounded: true, size: 'sm' }) })">
            </div>

            <p class="text-sm text-gray-500">{{ 'payReturn.processing'|trans({}, 'cms') }}</p>

        {% elseif 2 == status %}

            <div class="max-w-sm mx-auto">
                {% include '@FerienpassCms/partial/modal_confirm.html.twig' with {
                    headline: 'payReturn.done.headline'|trans({}, 'cms'),
                    text: 'payReturn.done.textWaiting'|trans({}, 'cms'),
                    href: path('cms', { to: 'applications' }),
                    linkText: 'payReturn.done.backToOverview'|trans({}, 'cms')
                } %}
            </div>

        {% elseif 3 == status %}

            <div class="max-w-sm mx-auto">
                {% include '@FerienpassCms/partial/modal_confirm.html.twig' with {
                    headline: 'payReturn.done.headline'|trans({}, 'cms'),
                    text: 'payReturn.done.textConfirmed'|trans({}, 'cms'),
                    href: path('cms', { to: 'applications' }),
                    linkText: 'payReturn.done.backToOverview'|trans({}, 'cms')
                } %}
            </div>

        {% else %}

            <div class="max-w-sm mx-auto">
                {% include '@FerienpassCms/partial/modal_error.html.twig' with {
                    headline: 'payReturn.failed.headline'|trans({}, 'cms'),
                    text: 'payReturn.failed.text'|trans({}, 'cms'),
                    href: path('cms', { to: 'applications' }),
                    linkText: 'payReturn.failed.retry'|trans({}, 'cms')
                } %}
            </div>

        {% endif %}
    </div>

{% endblock %}
