{% set steps = _args.steps|default([]) %}
{% set actions = _args.actions|default([])|filter((i) => i is not empty) %}
{% set subactions = _args.subactions|default([])|filter((i) => i is not empty) %}
<div class="nav-wrap-container msg-nav pt-0 sticky-top">
<div class="header header__wrapper makesticky">
<header class="header--light{% if steps %} header--steps{% endif %}">
<ul class="clear__list inline__list flex__wrap--xycenter">
{% for step in steps %}
<li class="steps{% if step.active|default(false) %} steps--active{% endif %}">
{% if step.button|default(null) %}
<span class="header__link">
{% if not step.hide_count|default(false) %}<span class="steps__count">{{ step.badge|default(loop.index) }}</span>{% endif %}
{% include '@ui2022/button.html.twig' with step.button|merge({
text: step.text,
}) %}
</span>
{% else %}
<span class="header__link">
{% if not step.hide_count|default(false) %}<span class="steps__count">{{ step.badge|default(loop.index) }}</span>{% endif %}
<span class="steps__label">{{ step.text }}</span>
</span>
{% endif %}
</li>
{% endfor %}
</ul>
</header>
<div class="header__actions header__actions--side">
{% if subactions is not empty %}
<ul class="clear__list inline__list btn__list">
{% for subaction in subactions %}
<li>
{% include '@ui2022/button.html.twig' with subaction %}
</li>
{% endfor %}
</ul>
{% endif %}
{% if actions is not empty %}
<ul class="clear__list inline__list btn__list ml-sm-auto">
{% for action in actions %}
<li>
{% if action is iterable %}
{% include '@ui2022/button.html.twig' with action %}
{% elseif action matches '/^(?:http\\:\\/\\/|https\\:\\/\\/|\\/)/' %}
<img class="header__actions__image" src="{{ action }}" />
{% else %}
<p class="mr-2">{{ action }}</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
</div>