{% block megamenu_link %}
<a href="{{ link }}"
itemprop="url"
title="{{ name }}"
{% if blank %}target="_blank"{% endif %}
{% if id is same as(activeId) %}class="active"{% endif %}
>
{% if hasChildren %}
<div class="d-flex w-100 justify-content-between">
<div>
{% if icon %}
{% sw_thumbnails 'megamenu-icon' with {
media: icon,
sizes: {
'default': '20px'
},
attributes: {
'class': 'category-icon',
'alt': name,
'title': name,
'loading': 'lazy'
}
} %}
{% endif %}
<span itemprop="name">{{ name }}</span>
</div>
{% sw_icon 'arrow-medium-down' style {'pack': 'solid', 'size': 'xs', 'class': 'filter-panel-item-toggle'} %}
</div>
{% else %}
{% if icon %}
{% sw_thumbnails 'megamenu-icon' with {
media: icon,
sizes: {
'default': '20px'
},
attributes: {
'class': 'category-icon',
'alt': name,
'title': name,
'loading': 'lazy'
}
} %}
{% endif %}
<span itemprop="name">{{ name }}</span>
{% endif %}
</a>
{% endblock %}