{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Provider\AdminContextProvider #}
{% trans_default_domain ea.hasContext ? ea.i18n.translationDomain : (translation_domain is defined ? translation_domain ?? 'messages') %}

{% set flash_messages = app.flashes %}

{% if flash_messages|length > 0 %}
    <div id="flash-messages">
        {% for label, messages in flash_messages %}
            {% for message in messages %}
                <twig:ea:Alert variant="{{ label }}" withDismissButton>
                    {{ message|trans|raw }}
                </twig:ea:Alert>
            {% endfor %}
        {% endfor %}
    </div>
{% endif %}
