{% set headerContent = headerContent ? headerContent : 'none' %}
{% set headerImage = headerImage ? headerImage : false %} {# e.g. theme_config('headerStylesLayoutHeaderTopImage')#}
{% set headerLocation = headerLocation ? headerLocation : 'general' %} {# e.g. top, center, bottom, bottomTail #}
{% if headerContent == 'none' %}
<!--empty-->
{# Deprecated, please use dedicated categories-1, categories-2, categories-3 and categories-4 slots #}
{% elseif headerContent == 'categories' %}
{% block header_deprecated_categories_wrapper %}
{% if(page.footer.navigation.tree) %}
{% for root in page.footer.navigation.tree|filter((u) => u.category.translated.name|lower in theme_config('headerStylesLayoutHeaderFooterCategories')) %}
{% block layout_header_actions_center_extra_link %}
<div class="header-action d-none d-md-flex">
<div class="header-action-extra-link">
<a class="header-extra-link-btn header-actions-btn ml-3 mr-3 {% if root.children %} dropdown-toggle{% endif %}" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ root.category.translated.name }}
</a>
{% if root.children %}
<div class="dropdown-menu list-unstyled" aria-labelledby="dropdownMenuLink">
{% for treeItem in root.children %}
{% set category = treeItem.category %}
{% set name = category.translated.name %}
{% set externalLink = category.translated.externalLink %}
{% block layout_header_actions_center_navigation_information_link_item %}
<div class="header-extra-menu-dropdown-link-item">
{% block layout_header_actions_center_navigation_information_link %}
<a class="menu-link" href="{% if externalLink %}{{ externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: category.id }) }}{% endif %}" title="{{ name }}">
{{ name }}
</a>
{% endblock %}
</div>
{% endblock %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% endfor %}
{% endif %}
{% endblock %}
{% elseif headerContent == 'image' %}
{% block header_image_wrapper %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_image_content %}
{% if headerImage %}
<img src="{{ headerImage|sw_encode_url }}" alt="{{ "header.logoLink"|trans|striptags }}" class="img-fluid header-top-image-img"/>
{% endif %}
{% endblock %}
</div>
{% endblock %}
{% elseif headerContent == 'usps' %}
{% block header_usps_wrapper %}
{% set uspKeys = uspKeys ? uspKeys : ['one', 'two', 'three'] %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_usps_content %}
<ul class="list-inline list-unstyled">
{% for uspKey in uspKeys %}
{% block header_usp_wrapper %}
<li class="usp-item list-inline-item">
{% block header_usp_content %}
{{ ("oo.header"~ headerLocation|capitalize ~".usps.usp" ~ uspKey|capitalize)|trans|striptags }}
{% endblock %}
</li>
{% endblock %}
{% endfor %}
</ul>
{% endblock %}
</div>
{% endblock %}
{% elseif headerContent == 'text' %}
{% block header_snippet_wrapper %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_snippet_content %}
<span>
{{ ("oo.header"~ headerLocation|capitalize ~".text.text")|trans|striptags }}
</span>
{% endblock %}
</div>
{% endblock %}
{% elseif headerContent == 'rating' %}
{% block header_rating_wrapper %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_rating_content %}
[ rating ]
{% endblock %}
</div>
{% endblock %}
{% elseif headerContent starts with 'categories' %}
{% block header_categories_wrapper %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_categories_content %}
{% sw_include '@Storefront/storefront/layout/header/categories-list.html.twig' with { setting: headerContent } %}
{% endblock %}
</div>
{% endblock %}
{% elseif headerContent == 'settings' %}
{% block header_settings_wrapper %}
<div class="header-{{ headerLocation }}-content header-{{ headerLocation }}-{{ headerContent }}">
{% block header_settings_content %}
{% sw_include '@Storefront/storefront/layout/header/actions/settings.html.twig' %}
{% endblock %}
</div>
{% endblock %}
{% endif %}