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

{% block main %}
    {% embed '@FerienpassAdmin/fragment/deleteModal.html.twig' with {
        translationPrefix: 'offers',
        form: form,
        modalHeadline: 'Termin löschen',
        modalConfirm: 'Möchten Sie diesen Termin wirklich löschen?',
        modalSubmit: 'Datum entfernen'
    } %}
    {% endembed %}
{% endblock %}

{% block success_stream %}
    <twig:Turbo:Stream:Remove target="#offer-date-{{ deletedUuid }}" />

    <twig:Turbo:Stream:Update target="#modal" />

    {% if isLastDate %}
        <twig:Turbo:Stream:Replace target="#offer-dates-component">
            <twig:Admin:Offer:OfferDates :offer="offer" />
        </twig:Turbo:Stream:Replace>
    {% endif %}
{% endblock %}
