{% from "components/banner.html" import banner %}
{% with messages = get_flashed_messages(with_categories=true) %}
  {% if messages %}
    {% for category, message in messages %}
      {{ banner(
        message,
        'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous',
        delete_button="Yes, {}".format(category) if category in ['delete', 'suspend', 'resume', 'remove'] else None,
        with_tick=True if category == 'default_with_tick' else False
      )}}
    {% endfor %}
  {% endif %}
{% endwith %}
