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

<div id="edit-component-container" {{ attributes.defaults(stimulus_controller('ferienpass/admin-edit', {
    unsavedChangesUrl: path('admin_unsaved_changes_modal'),
    formDirty: formDirty|default(false),
    isCopy: isCopy|default(false)
})) }}
        data-action="beforeunload@window->ferienpass--admin-edit#leavingPage turbo:before-visit@window->ferienpass--admin-edit#leavingPage ferienpass-edit:continue@window->ferienpass--admin-edit#continueWithoutSave ferienpass-edit:close@window->ferienpass--admin-edit#closeUnsavedModal"
>

    {% include '@FerienpassAdmin/layout/_edit.html.twig' %}

    {% if message|default %}
        <twig:Turbo:Stream:Prepend target="#notifications">
            <twig:Admin:Notification type="success" title="Daten gespeichert" :message="message" />
        </twig:Turbo:Stream:Prepend>
    {% endif %}

</div>
