{#  Flashbag #}

{% for label, messages in app.flashes %}
    <section class="container">
        {# Flashbag labels have the same names of the Bootstrap alert classes #}
        <div class="alert alert-{{ label }} alert-dismissible fade show text-center h5 my-4" role="alert">
            {% for message in messages %}
                {# We display different icon relative to the label #}
                <p class="text-center font-weight-bold">{{ message|raw }} {% if label is same as("success") %}&#x1F44D;{%
                    elseif label is same as("danger") %}&#x1F6A7;{% endif %}</p>
            {% endfor %}
        </div>
    </section>
{% endfor %}