{% set currentTab = '' %}
{% set currentCount = 0 %}
{% set lastLocation = '' %}
{% for hotel_menu in hotels %}
{% if currentTab != hotel_menu.location.class and currentTab != '' %}
</div>
{% endif %}
{% if currentTab != hotel_menu.location.class %}
<div class="submenu" id="submenu-{{ hotel_menu.location.class }}">
<div class="submenu--return js-submenu-close">
{% include 'partials/global/svg/icon-arrow-artiem.svg.twig' %}
<span>{{ 'app.global.return'|trans }}</span>
</div>
<div class="submenu--close js-menu-close">
{% include 'partials/global/svg/close.svg.twig' %}
</div>
<a class="submenu--title" href="{{ url(hotel_menu.location) }}">{{ hotel_menu.location.class }}</a>
<a class="submenu--subtitle" href="{{ url(hotel_menu.location) }}">{{ 'app.global.view_destiny'|trans }}</a>
{% set currentTab = hotel_menu.location.class %}
{% set currentCount = 0 %}
{% endif %}
{% if hotel_menu.enabled %}
{% if lastLocation != currentTab %}
<div class="submenu--group-wrapper">
{% endif %}
<div class="submenu--group">
<div class="submenu--col {{ currentCount == 0 ? 'is-active' : ''}}">
<a class="submenu--item js-go-page" href="{{ path(hotel_menu, {'type': 'hotel'}) }}"><span>ARTIEM </span>{{ hotel_menu.simpleName }}</a>
<button
class="submenu--arrow js-dropdown {{ currentCount == 0 ? 'is-active' : ''}}">{% include 'partials/global/svg/icon-arrow-artiem.svg.twig' %}</button>
<ul class="submenu--dropdown">
{% if hotel_menu.id != 6 %}
<li class="submenu--subitem">
<a href="{{ path(hotel_menu, {'type': 'room'}) }}">{{ 'app.global.rooms' | trans }}</a>
</li>
{% endif %}
{% if hotel_menu.id == 6 %}
<li class="submenu--subitem">
<a href="{{ path(hotel_menu, {'type': 'room'}) }}">{{ 'app.global.apartments' | trans }}</a>
</li>
{% endif %}
{% for experience_menu in hotel_menu.experiences %}
<li class="submenu--subitem">
<a class="js-go-page" href="{{ url(experience_menu) }}">{{ experience_menu.menuTitle }}</a>
</li>
{% endfor %}
</ul>
</div>
<a class="submenu--col" href="{{ path(hotel_menu, {'type': 'hotel'}) }}" style="background-image: url({{ hotel_menu.mainImage|resize(500)|file_url }});"></a>
</div>
{% set lastLocation = currentTab %}
{% if hotels[loop.index] is defined and hotels[loop.index].location.class != lastLocation %}
</div>
{% elseif loop.last %}
</div>
{% endif %}
{% set currentCount = currentCount + 1 %}
{% endif %}
{% endfor %}
</div>