{% set title = title %}
{% set text = text %}
{% set label = label ? label : "Fechar" %}
{% set intent = intent ? intent : 'alert' %}
{% set redirect = redirect ? redirect : null %}
{# intent: success||negative||alert #}

<div class="Modal-alerta {{ intent ? '_' ~ intent : '' }}  mfp-hide">
	<div class="modal">
		<div class="modal-head">
			<span class="icon">
				<i>
					{% if intent == 'success' %}
						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none">
							<path d="M20 6L9 17L4 12" stroke="#2E9044" stroke-width="2.5" stroke-linecap="square"/>
						</svg>
					{% endif %}
					{% if intent == 'negative' %}
						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 24 24" fill="none">
							<path d="M18 6L6 18" stroke="#CF4646" stroke-width="2.5" stroke-linecap="square" stroke-linejoin="round"/>
							<path d="M6 6L18 18" stroke="#CF4646" stroke-width="2.5" stroke-linecap="square" stroke-linejoin="round"/>
						</svg>
					{% endif %}
				</i>
			</span>

			{% if title or text %}
				<div class="content">
					{% if title %}
						<h3 class="Title _xs">{{ title }}</h3>
					{% endif %}
					{% if text %}
						<p class="Modal-alerta__texto Body">{{ text }}</p>
					{% endif %}
				</div>
			{% endif %}
		</div>

		{% if redirect %}
			<a class="Button" href="{{ redirect }}">{{ label }}</a>
		{% else %}
			<button class="Button" onclick="$.magnificPopup.close();">{{ label }}</button>
		{% endif %}
	</div>
</div>
