{% macro default(message, icon, type, header) %}
    {% set bootstrap = type %}
    {% if type == 'negative' %}
        {% set bootstrap = 'danger' %}
    {% endif %}

    <p class="ui message {{ type|default('positive') }} alert alert-{{ bootstrap|default('success') }}" {{ sylius_test_html_attribute('flash-message', type) }}>
        {% if type is not empty %}
            <i class="fa fa-{{ icon }}"></i>&nbsp;{{ header|default(type)|trans }}<br>
        {% endif %}
        {{ message|trans }}
    </p>
{% endmacro %}

{% macro info(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'info-circle', 'info', 'sylius.ui.info') }}
{% endmacro %}

{% macro success(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'check', 'success', 'sylius.ui.success') }}
{% endmacro %}

{% macro error(message) %}
    {% import _self as messages %}
    {{ messages.default(message, 'exclamation-circle', 'negative', 'sylius.ui.error') }}
{% endmacro %}
