{% sw_extends '@Storefront/storefront/utilities/alert.html.twig' %}
{% block utilities_alert %}
{% set nextagShowMessages = true %}
{% if 'Zahlungsart' in content and 'gesperrt' in content %}
{% set nextagShowMessages = false %}
{% endif %}
{% if 'Versandart' in content and 'gesperrt' in content %}
{% set nextagShowMessages = false %}
{% endif %}
{% if content == 'Versände an die gewählte Lieferadresse sind nicht möglich.' %}
{% set nextagShowMessages = false %}
{% endif %}
{% if content == 'Gewählte Versandart steht nicht zur Verfügung' %}
{% set nextagShowMessages = false %}
{% endif %}
{% for message in list %}
{% if 'Zahlungsart' in message and 'gesperrt' in message %}
{% set nextagShowMessages = false %}
{% endif %}
{% if 'Versandart' in message and 'gesperrt' in message %}
{% set nextagShowMessages = false %}
{% endif %}
{% if message == 'Versände an die gewählte Lieferadresse sind nicht möglich.' %}
{% set nextagShowMessages = false %}
{% endif %}
{% if message == 'Gewählte Versandart steht nicht zur Verfügung' %}
{% set nextagShowMessages = false %}
{% endif %}
{% endfor %}
{% set icon = "false" %}
{% if nextagShowMessages == true %}
<div role="alert"
class="alert {% if type %}alert-{{ type }}{% endif %}{% if dismissible %} alert-dismissible fade show{% endif %}{% if icon != "error" and icon != "false" %} alert-has-icon{% endif %}">
{% block utilities_alert_icon %}
{% if icon != "false" %}
{% if type == "danger" %}
<span class="icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.4735 3.52653C18.2204 1.24898 15.2082 0 12 0C8.79184 0 5.77959 1.24898 3.52653 3.52653C1.24898 5.77959 0 8.79184 0 12C0 15.2082 1.24898 18.2204 3.52653 20.4735C5.77959 22.751 8.79184 24 12 24C15.2082 24 18.2204 22.751 20.4735 20.4735C22.751 18.2204 24 15.2082 24 12C24 8.79184 22.751 5.77959 20.4735 3.52653ZM19.9592 19.9592C17.8286 22.0898 15.0122 23.2408 12 23.2408C8.98775 23.2408 6.17143 22.0653 4.04082 19.9347C1.9102 17.8286 0.759184 15.0122 0.759184 12C0.759184 8.98775 1.93469 6.17143 4.06531 4.04082C6.17143 1.9102 8.98775 0.759184 12 0.759184C15.0122 0.759184 17.8286 1.93469 19.9592 4.06531C22.0898 6.19592 23.2653 9.01224 23.2653 12.0245C23.2653 15.0367 22.0898 17.8286 19.9592 19.9592Z" fill="#26B6CF"/>
<path d="M12.392 9.37964H11.6328V17.6327H12.392V9.37964Z" fill="#26B6CF"/>
<path d="M12.392 6.36731H11.6328V7.86119H12.392V6.36731Z" fill="#26B6CF"/>
</svg>
</span>
{% elseif type == "warning" %}
<span class="icon">
<svg width="24" height="23" viewBox="0 0 24 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.7592 11.3796H12V19.6327H12.7592V11.3796Z" fill="#FF00B8"/>
<path d="M12.7592 8.36743H12V9.86131H12.7592V8.36743Z" fill="#FF00B8"/>
<path d="M0.311664 23H23.6883C23.7964 23 23.8967 22.9463 23.9535 22.8583C24.0102 22.7702 24.0154 22.6601 23.9672 22.5674L12.2788 0.151918C12.1732 -0.0506393 11.8268 -0.0506393 11.7212 0.151918L0.0328488 22.5674C-0.015396 22.6601 -0.0102215 22.7702 0.0465461 22.8583C0.103314 22.9463 0.203608 23 0.311664 23ZM12 0.953828L23.184 22.4023H0.816028L12 0.953828Z" fill="#FF00B8"/>
</svg>
</span>
{% elseif type == "info" %}
<span class="icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.4735 3.52653C18.2204 1.24898 15.2082 0 12 0C8.79184 0 5.77959 1.24898 3.52653 3.52653C1.24898 5.77959 0 8.79184 0 12C0 15.2082 1.24898 18.2204 3.52653 20.4735C5.77959 22.751 8.79184 24 12 24C15.2082 24 18.2204 22.751 20.4735 20.4735C22.751 18.2204 24 15.2082 24 12C24 8.79184 22.751 5.77959 20.4735 3.52653ZM19.9592 19.9592C17.8286 22.0898 15.0122 23.2408 12 23.2408C8.98775 23.2408 6.17143 22.0653 4.04082 19.9347C1.9102 17.8286 0.759184 15.0122 0.759184 12C0.759184 8.98775 1.93469 6.17143 4.06531 4.04082C6.17143 1.9102 8.98775 0.759184 12 0.759184C15.0122 0.759184 17.8286 1.93469 19.9592 4.06531C22.0898 6.19592 23.2653 9.01224 23.2653 12.0245C23.2653 15.0367 22.0898 17.8286 19.9592 19.9592Z" fill="#26B6CF"/>
<path d="M12.392 9.37964H11.6328V17.6327H12.392V9.37964Z" fill="#26B6CF"/>
<path d="M12.392 6.36731H11.6328V7.86119H12.392V6.36731Z" fill="#26B6CF"/>
</svg>
</span>
{% elseif type == "success" %}
<span class="icon">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 24 24" xml:space="preserve">
<path fill="#28ce2c" d="M20.5 3.5C18.2 1.2 15.2 0 12 0S5.8 1.2 3.5 3.5 0 8.8 0 12s1.2 6.2 3.5 8.5S8.8 24 12 24s6.2-1.2 8.5-3.5S24 15.2 24 12s-1.2-6.2-3.5-8.5zM20 20c-2.1 2.1-4.9 3.3-8 3.3-3 0-5.8-1.2-8-3.3-2.1-2.2-3.2-5-3.2-8S2 6.2 4.1 4C6.2 1.9 9 .8 12 .8s5.8 1.2 8 3.3c2.1 2.1 3.3 4.9 3.3 8 0 2.9-1.2 5.7-3.3 7.9z"/>
<path fill="#28ce2c" d="M5.1 14.1l5 3.5 8.5-10.3-1.1-.8-7.6 9.2-4-2.7-.8 1.1z"/>
</svg>
</span>
{% else %}
<span class="icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20.4735 3.52653C18.2204 1.24898 15.2082 0 12 0C8.79184 0 5.77959 1.24898 3.52653 3.52653C1.24898 5.77959 0 8.79184 0 12C0 15.2082 1.24898 18.2204 3.52653 20.4735C5.77959 22.751 8.79184 24 12 24C15.2082 24 18.2204 22.751 20.4735 20.4735C22.751 18.2204 24 15.2082 24 12C24 8.79184 22.751 5.77959 20.4735 3.52653ZM19.9592 19.9592C17.8286 22.0898 15.0122 23.2408 12 23.2408C8.98775 23.2408 6.17143 22.0653 4.04082 19.9347C1.9102 17.8286 0.759184 15.0122 0.759184 12C0.759184 8.98775 1.93469 6.17143 4.06531 4.04082C6.17143 1.9102 8.98775 0.759184 12 0.759184C15.0122 0.759184 17.8286 1.93469 19.9592 4.06531C22.0898 6.19592 23.2653 9.01224 23.2653 12.0245C23.2653 15.0367 22.0898 17.8286 19.9592 19.9592Z" fill="#26B6CF"/>
<path d="M12.392 9.37964H11.6328V17.6327H12.392V9.37964Z" fill="#26B6CF"/>
<path d="M12.392 6.36731H11.6328V7.86119H12.392V6.36731Z" fill="#26B6CF"/>
</svg>
</span>
{% endif %}
{% endif %}
{% endblock %}
{% block utilities_alert_content_container %}
<div class="alert-content-container">
{% block utilities_alert_heading %}
{% if heading %}
<div class="alert-heading h5">
{{ heading }}
</div>
{% endif %}
{% endblock %}
{% block utilities_alert_content %}
<div class="alert-content">
{% if list|length > 1 %}
<ul class="alert-list">
{% for entry in list %}
<li>{{ entry|sw_sanitize }}</li>
{% endfor %}
</ul>
{% elseif list|length == 1 %}
{% for entry in list %}
{{ entry|sw_sanitize }}
{% endfor %}
{% else %}
{{ content|sw_sanitize }}
{% endif %}
</div>
{% endblock %}
{% block utilities_alert_dismissible %}
{% if dismissible %}
<button type="button"
class="close"
data-dismiss="alert"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
{% endif %}
{% endblock %}
</div>
{% endblock %}
</div>
{% endif %}
{% endblock %}