{% if app.session is not null and app.session.started %}
    {% set _flash_messages = app.session.flashbag.all %}

    {% if _flash_messages|length > 0 %}
        <div id="lc-flash-messages">
            {% for label, messages in _flash_messages %}
                {% for message in messages %}
                    <div class="notice">
                        <span class="type">{{ label }}</span>
                        <span class="message"> {{ message|trans|striptags }}</span>
                    </div>
                {% endfor %}
            {% endfor %}
        </div>
    {% endif %}
{% endif %}
