
{% macro alert_warning(message, title, icon) %}
    {{ _self.alert('warning', message, title, icon) }}
{% endmacro %}

{% macro alert_info(message, title, icon) %}
    {{ _self.alert('info', message, title, icon) }}
{% endmacro %}

{% macro alert_danger(message, title, icon) %}
    {{ _self.alert('danger', message, title, icon) }}
{% endmacro %}

{% macro alert_success(message, title, icon) %}
    {{ _self.alert('success', message, title, icon) }}
{% endmacro %}

{% macro alert(type, message, title, icon) %}
    <div class="alert alert-{{ type }}">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        {% if title %}
            <h5>
                {% if icon %}<i class="icon fas fa-{{ icon }}"></i>{% endif %}
                {{ title }}
            </h5>
        {% endif %}
        {{ message }}
    </div>
{% endmacro %}