{% macro item(taxon) %}
{% import _self as macros %}
{% set children = taxon.getEnabledChildrenByTranslationName(taxon.translation.locale) %}
{% if children|length > 0 %}
<div class="accordion transition visible">
<div class="title">
<a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="menu-title-link">
{{ taxon.name }}
</a>
<img class="icon toggle-icon" src="{{ asset('build/shop/images/keyboard_arrow_down.svg', 'shop') }}" alt="Expand more">
</div>
<div class="content">
{% for childTaxon in children %}
{{ macros.item(childTaxon) }}
{% endfor %}
</div>
</div>
{% else %}
<a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="accordion-link item font-bold">
{{ taxon.name }}
</a>
{% endif %}
{% endmacro %}
{% import _self as macros %}
{% if taxons|length > 0 %}
{% for taxon in taxons %}
{{ macros.item(taxon) }}
{% endfor %}
{{ render(path('open_marketplace_shop_render_country_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/country.html.twig'})) }}
<a href="{{ path('open_marketplace_shop_vendor_index') }}" class="accordion-link item font-bold">{{ 'app.ui.brands'|trans }}</a>
{{ render(path('open_marketplace_shop_render_use_case_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/useCase.html.twig'})) }}
<a href="{{ path('sylius_shop_login') }}" class="accordion-link item font-bold" {% if is_granted('ROLE_USER') %} style="display: none;" {% endif %}>{{ 'app.ui.register_products'|trans }}</a>
{% endif %}