{% apply spaceless %}
{% set numberOfMessages = 0 %}
{% if translation_domain is not defined %}
{% set translation_domain = null %}
{% endif %}
{% if close is not defined %}
{% set close = false %}
{% endif %}
{% for flashMessage in app.session.flashbag.get('alert') %}
<div class="alert warning d-flex">
<div class="message flex-grow-1 pr-3">
{{ flashMessage|trans({}, translation_domain) }}
</div>
{% if close %}
<a href="#" class="close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close', class: 'icon-sm' } %}
</a>
{% endif %}
</div>
{% set numberOfMessages = numberOfMessages + 1 %}
{% endfor %}
{% for flashMessage in app.session.flashbag.get('danger') %}
<div class="alert danger d-flex">
<div class="message flex-grow-1 pr-3">
{{ flashMessage|trans({}, translation_domain) }}
</div>
{% if close %}
<a href="#" class="close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close', class: 'icon-sm' } %}
</a>
{% endif %}
</div>
{% set numberOfMessages = numberOfMessages + 1 %}
{% endfor %}
{% for flashMessage in app.session.flashbag.get('info') %}
<div class="alert info d-flex">
<div class="message flex-grow-1 pr-3">
{{ flashMessage|trans({}, translation_domain) }}
</div>
{% if close %}
<a href="#" class="close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close', class: 'icon-sm' } %}
</a>
{% endif %}
</div>
{% set numberOfMessages = numberOfMessages + 1 %}
{% endfor %}
{% for flashMessage in app.session.flashbag.get('success') %}
<div class="alert success d-flex">
<div class="message flex-grow-1 pr-3">
{{ flashMessage|trans({}, translation_domain) }}
</div>
{% if close %}
<a href="#" class="close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close', class: 'icon-sm' } %}
</a>
{% endif %}
</div>
{% set numberOfMessages = numberOfMessages + 1 %}
{% endfor %}
{% for flashMessage in app.session.flashbag.get('warning') %}
<div class="alert warning d-flex">
<div class="message flex-grow-1 pr-3">
{{ flashMessage|trans({}, translation_domain) }}
</div>
{% if close %}
<a href="#" class="close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close', class: 'icon-sm' } %}
</a>
{% endif %}
</div>
{% set numberOfMessages = numberOfMessages + 1 %}
{% endfor %}
{% endapply %}