{% set class = class|default('') %}
{% set imageObject = imageObject|default(null) %}
{% set tabs = tabs|default([]) %}
{% set floorGroupPlace = floorGroupPlace|default(null) %}
<div class="layout-tabs-block {{ class }}">
<div class="layout-tabs-block__tabs tabs tabs__minor">
<ul class="layout-tabs-block__tabs-list smart-tabs tabs__list" data-smart-tabs>
{% for tab in tabs %}
{% if tab['key'] == 'flat' %}
{% if imageObject is has_image(tab.imageFieldName) %}
<li class="layout-tabs-block__tab smart-tab tabs__item {% if loop.first %}_active{% endif %}">
<a href="#layout-modal-tab-{{ loop.index }}"
class="layout-tabs-block__link tabs__link"
data-tab-link
>
<span class="layout-tabs-block__link-title tabs__text text__small">
{{ tab.name }}
</span>
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
{% if floorGroupPlace %}
<li class="layout-tabs-block__tab smart-tab tabs__item {% if not tabs|length %}_active{% endif %}">
<a href="#layout-modal-tab-plan"
class="layout-tabs-block__link tabs__link"
data-tab-link
>
<span class="layout-tabs-block__link-title tabs__text text__small">
План этажа
</span>
</a>
</li>
{% endif %}
{% for tab in tabs %}
{% if tab['key'] == 'furniture' %}
{% if imageObject is has_image(tab.imageFieldName) %}
<li class="layout-tabs-block__tab smart-tab tabs__item
{% if loop.first and not floorGroupPlace %}_active{% endif %}"
>
<a href="#layout-modal-tab-{{ loop.index }}"
class="layout-tabs-block__link tabs__link"
data-tab-link
>
<span class="layout-tabs-block__link-title tabs__text text__small">
{{ tab.name }}
</span>
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
<div class="layout-tabs-block__contents">
{% for tab in tabs %}
{% if tab['key'] == 'flat' %}
<div id="layout-modal-tab-{{ loop.index }}"
class="layout-tabs-block__content smart-content {% if loop.first %}_active{% endif %}"
data-smart-content
>
{% if imageObject is has_image(tab.imageFieldName) %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: imageObject,
field: tab.imageFieldFile,
size: 'layout_modal_image',
alt: tab.name,
class: 'layout-tabs-block__image',
classPicture: 'layout-tabs-block__picture',
} %}
{% endif %}
</div>
{% endif %}
{% endfor %}
{% if floorGroupPlace %}
<div id="layout-modal-tab-plan"
class="layout-tabs-block__content smart-content {% if not tabs|length %}_active{% endif %}"
data-smart-content
>
{% include '_parts/genplan/_on-plan-genplan.html.twig' with {
class: 'layout-tabs-block__genplan',
floorGroupPlace: floorGroupPlace,
disableOnReady: true
} %}
</div>
{% endif %}
{% for tab in tabs %}
{% if tab['key'] == 'furniture' %}
<div id="layout-modal-tab-{{ loop.index }}"
class="layout-tabs-block__content smart-content
{% if loop.first and not floorGroupPlace %}_active{% endif %}"
data-smart-content
>
{% if imageObject is has_image(tab.imageFieldName) %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: imageObject,
field: tab.imageFieldFile,
size: 'layout_modal_image',
alt: tab.name,
class: 'layout-tabs-block__image',
classPicture: 'layout-tabs-block__picture',
} %}
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
</div>