{% set title = _args.title %}
{% set subtitle = _args.subtitle|default(null) %}
{% set icon = _args.icon|default(null) %}
{% set stats = _args.stats|default([])|filter((s) => s is not empty) %}
<div class="section__infostats mb-4 pb-1">
<div class="card card__deliverymethods">
<div class="d-flex align-items-center pb-3 mb-4">
{% if icon %}
<i class="{{ icon}} mr-3 pr-1 h1 mb-0"></i>
{% endif %}
<span class="text-gray-dark text-semibold h3 mb-0">
{{ title }}
{% if subtitle %}
<small>{{ subtitle }}</small>
{% endif %}
</span>
</div>
<div class="dm__stats px-15 mb-4">
<div class="row">
{% for stat in stats %}
<div class="col-md col-12 mb-3 mb-md-0">
<div class="text-semibold text-gray-dark dm__stats--label">
{{ stat.label }}
{% if stat.progress|default(null) is not null %}
{% if stat.link|default(null) %}
<a
href="{{ stat.link|e('html_attr') }}"
class="text-secondary text-medium"
{% if stat.dataToggle|default(null) %}
data-toggle="{{ stat.dataToggle }}"
{% endif %}
{% if stat.dataTarget|default(null) %}
data-target="{{ stat.dataTarget }}"
{% endif %}
>
{% else %}
<span>
{% endif %}
{{ stat.value }}
</{{ stat.link|default(null) ? 'a' : 'span' }}>
{% endif %}
{% if stat.tooltip|default(null) %}
<span class="badge badge--sphere text-extrabold" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{ stat.tooltip }}">?</span>
{% endif %}
</div>
<div class="dm__stats--value">
{% if stat.progress|default(null) is not null %}
<div class="progress__chart progress__chart--dm">
{% include '@ui2022/progress--simple.html.twig' with {
value: stat.progress,
} %}
</div>
{% else %}
{% if stat.link|default(null) %}
<a
href="{{ stat.link|e('html_attr') }}"
class="text-secondary text-medium"
{% if stat.dataToggle|default(null) %}
data-toggle="{{ stat.dataToggle }}"
{% endif %}
{% if stat.dataTarget|default(null) %}
data-target="{{ stat.dataTarget }}"
{% endif %}
>
{% else %}
<span>
{% endif %}
{{ stat.value }}
</{{ stat.link|default(null) ? 'a' : 'span' }}>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
<div class="dm__info font-14 text-medium pt-1">
{% block content %}{% endblock %}
</div>
</div>
</div>