{% sw_extends '@Storefront/storefront/layout/navigation/categories.html.twig' %}
{% block layout_navigation_categories_item %}
{% set countNav = '' %}
{% if level == 0 %}
{% set countNav = navigationTree|length %}
{% endif %}
<div class="{% if level == 0 %}{% if navigationMedia %}col-4 {% else %}{% if countNav > 4 %}col-2{% else %}col-3 {% endif %} {% endif %}{% endif %}navigation-flyout-col">
{% block layout_navigation_categories_item_link %}
{% if treeItem.category.type == 'folder' %}
<div class="nav-item nav-link navigation-flyout-link is-level-{{ level }}"
title="{{ name }}">
<span itemprop="name">{{ name }}</span>
</div>
{% else %}
<a class="nav-item nav-link navigation-flyout-link is-level-{{ level }}{% if id == activeId or id in activePath %} active{% endif %}"
href="{{ link }}"
itemprop="url"
{% if category_linknewtab(treeItem.category) %}target="_blank"
{% if treeItem.category.linkType == "external" %}rel="noopener noreferrer"{% endif %}
{% endif %}
title="{{ name }}">
<span itemprop="name">{{ name }}</span>
</a>
{% endif %}
{% endblock %}
{% block layout_navigation_categories_recoursion %}
{% if level < navigationMaxDepth %}
{% sw_include '@Storefront/storefront/layout/navigation/categories.html.twig' with {
navigationTree: treeItem.children,
level: level + 1,
page: page
} only %}
{% endif %}
{% endblock %}
</div>
{% endblock %}