{% macro notify() -%} {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %}
<div class="excel-notifications">
    {% for category, message in messages %}
    <div class="alert excel-alert excel-alert-{{ category }} alert-dismissible fade show" role="alert">
        {% if category == 'success' %}
        <i class="bi bi-check-circle-fill me-2"></i>
        {% elif category == 'error' or category == 'danger' %}
        <i class="bi bi-exclamation-circle-fill me-2"></i>
        {% elif category == 'warning' %}
        <i class="bi bi-exclamation-triangle-fill me-2"></i>
        {% else %}
        <i class="bi bi-info-circle-fill me-2"></i>
        {% endif %}
        <span>{{ message }}</span>
        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ _('Cerrar') }}"></button>
    </div>
    {% endfor %}
</div>
{% endif %} {% endwith %} {% endmacro %}
