{% if 'success' == envelope.type %}
    {% set title = 'Success' %}
    {% set alert_class = 'alert-success' %}
    {% set progress_bg_color = '#155724' %}
{% elseif 'error' == envelope.type %}
    {% set title = 'Error' %}
    {% set alert_class = 'alert-danger' %}
    {% set progress_bg_color = '#721c24' %}
{% elseif 'warning' == envelope.type %}
    {% set title = 'Warning' %}
    {% set alert_class = 'alert-warning' %}
    {% set progress_bg_color = '#856404' %}
{% else %}
    {% set title = 'Info' %}
    {% set alert_class = 'alert-info' %}
    {% set progress_bg_color = '#0c5460' %}
{% endif %}

<div style="margin-top: 0.5rem;cursor: pointer;">
    <div class="alert {{ alert_class }} alert-dismissible fade in show" role="alert" style="border-top-left-radius: 0;border-bottom-left-radius: 0;border: unset;border-left: 6px solid {{ progress_bg_color }}">
        {#        <strong>{{ title | trans }} !</strong> #}
        {{ envelope.message }}
        <button type="button" class="close" data-dismiss="alert" aria-label="Close" onclick="this.parentElement.remove()">
            <span aria-hidden="true">&times;</span>
        </button>
    </div>
    <div class="d-flex" style="height: .125rem;margin-top: -1rem;">
        <span class="flasher-progress" style="background-color: {{ progress_bg_color }}"></span>
    </div>
</div>
