<div
    data-module="dm-alert"
    role="alert"
    aria-label="{{ params.titleHtml|striptags if params.titleHtml else params.titleText }}"
    class="dm-alert{%- if params.type %} dm-alert--{{ params.type }}{% endif %}{%- if params.classes %} {{ params.classes }}{% endif %}"
    {%- for attribute in (params.attributes | default({}) | dictsort) %} {{attribute[0]}}="{{attribute[1]}}" {%- endfor %}
    tabindex="-1"
>
    <h{% if params.headingLevel %}{{ params.headingLevel }}{% else %}2{% endif %}
        class="dm-alert__title{% if params.html or params.text %} dm-alert__title--large{% endif %}"
    >
        {{ params.titleHtml|safe if params.titleHtml else params.titleText }}
    </h{% if params.headingLevel %}{{ params.headingLevel }}{% else %}2{% endif %}>
    {% if params.html or params.text %}
        <div class="dm-alert__body">
            {{ params.html|safe if params.html else params.text }}
        </div>
    {% endif %}
</div>
