{#
/**
 * @file
 * Theme override for status messages using SDC gcds-notice.
 */
#}
<div data-drupal-messages>
{%- block messages -%}
{%- for type, messages in message_list -%}
  {%- if type == 'error' -%}
    {%- set gcds_type = 'danger' -%}
  {%- elseif type == 'warning' -%}
    {%- set gcds_type = 'warning' -%}
  {%- else -%}
    {%- set gcds_type = 'success' -%}
  {%- endif -%}
  {% set default %}
    {%- if messages|length > 1 -%}
      <ul class="messages__list">
        {%- for message in messages -%}
          <li class="messages__item">{{ message }}</li>
        {%- endfor -%}
      </ul>
    {%- else -%}
      {{- messages|first -}}
    {%- endif -%}
  {% endset %}
  {{- include('gcds:gcds-notice', {
    'notice_title': status_headings[type],
    'notice_title_tag': 'h2',
    'type': gcds_type,
    default,
    'class': ['my-500'],
  }, with_context = false) -}}
{%- endfor -%}
{%- endblock messages -%}
</div>
