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

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

{% block edit_page_header %}
    <twig:Admin:Edition:Header edition="{{ item }}"/>
{% endblock %}

{% block edit_form %}

    {% if component_class is defined %}
        {% set component_name = component_class|split('\\')|last %}
        {{ component('Admin:Edition:' ~ component_name, {
            edition: item,
            sections: formScreen.sections,
            section: section,
        }) }}
    {% else %}
        <twig:Admin:Edit:Edition
                class="border-t border-gray-200 dark:border-gray-800 mt-6 pt-6"
                form="{{ form }}"
                formOptions="{{ formOptions }}"
                item="{{ item }}"
                sections="{{ formScreen.sections }}"
                section="{{ section }}"
        />
    {% endif %}

{% endblock %}
