{% set class = class|default('') %}
{% set heroSettings = heroSettings|default(null) %}
{% set slides = heroSettings.heroSlides.toArray() %}
{% set typeClass = get_hero_type() %}
{% if slides %}
<div class="hero {{ class }} {{ typeClass }}">
<div class="hero__top">
{% set heroThumb = 'hero_thumb_one' %}
{% if typeClass == 'hero_two' %}
{% set heroThumb = 'hero_thumb_one' %}
{% endif %}
{% if typeClass == 'hero_three' %}
{% set heroThumb = 'hero_thumb_three' %}
{% endif %}
{% if typeClass == 'hero_four' %}
{% set heroThumb = 'hero_thumb_four' %}
{% endif %}
{% if typeClass == 'hero_five' %}
{% set heroThumb = 'hero_thumb_four' %}
{% endif %}
{% if typeClass == 'hero_six' %}
{% set heroThumb = 'hero_thumb_one' %}
{% endif %}
<ul data-rslider="hero-slider" class="hero__images-slider" style="touch-action: pan-y;">
{% for slide in slides %}
{% if slide is has_image('imageName') %}
<div data-rslide class="hero__images-slide {% if loop.first %}_active{% endif %}">
{% if slide is has_image('imageName') and slide is not has_image('imageMobName') %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: slide,
field: 'imageFile',
size: heroThumb,
alt: slide.title ?? 'Hero слайд',
class: 'hero__image',
classPicture: 'hero__picture',
} %}
{% endif %}
{% if slide is has_image('imageName') and slide is has_image('imageMobName') %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: slide,
field: 'imageFile',
size: heroThumb,
alt: slide.title ?? 'Hero слайд',
class: 'hero__image hero__image_desk',
classPicture: 'hero__picture hero__picture-slide hero__picture-slide_desk',
} %}
{% include '_parts/image/adaptive-image.html.twig' with {
object: slide,
field: 'imageMobFile',
size: heroThumb,
alt: slide.title ?? 'Hero слайд',
class: 'hero__image hero__image_mob',
classPicture: 'hero__picture hero__picture-slide hero__picture-slide_mob',
} %}
{% endif %}
</div>
{% endif %}
{% endfor %}
</ul>
<div class="hero__slider-content">
<div class="container container_spacer">
<div class="hero__slider-content-inner">
<ul data-rslider-friends-for="hero-slider"
data-rslider-friends="texts"
class="hero__texts-slider"
>
{% for slide in slides %}
<li data-rslide-friend class="hero__text-slide {% if loop.first %}_active{% endif %}">
{% if heroSettings is has_image('logoImageName') %}
<div class="hero__text-slide-logo">
{% include '_parts/image/adaptive-image.html.twig' with {
object: heroSettings,
field: 'logoImageFile',
size: 'hero_logo_thumb',
alt: heroSettings.title,
class: 'hero__image',
classPicture: 'hero__picture hero__picture_logo',
} %}
</div>
{% endif %}
{% if loop.first %}
{% if slide.title %}
<h1 class="hero__text-title">
{{ slide.title }}
</h1>
{% endif %}
{% else %}
{% if slide.title %}
<div class="hero__text-title">
{{ slide.title }}
</div>
{% endif %}
{% endif %}
{% if slide.description %}
<div class="hero__text-description">
{{ slide.description }}
</div>
{% endif %}
{% if slide.link %}
<a href="{{ slide.link }}"
title="{{ slide.linkTitle }}"
class="hero__text-link link link_light"
data-goal-yandex-click="{{ settings().heroButtonGoal }}"
data-goal-vk-click="{{ settings().heroButtonGoal }}"
{% if slide.isScrollLink %}
data-scroll-link
{% endif %}
>
<span class="link__inner">
<span class="link__title-wrap">
<span class="link__title">
{{ slide.linkTitle }}
</span>
<span class="link__title link__title_duplicate">
{{ slide.linkTitle }}
</span>
</span>
<span class="link__arrow">
{% include '_parts/icons/arrow-mini.svg' %}
</span>
</span>
</a>
{% endif %}
<a href="{{ path('request:look_modal') }}"
title="Записаться на просмотр"
class="hero__view-modal button button_hero"
data-modal
>
Записаться на просмотр
</a>
</li>
{% endfor %}
</ul>
{% if slides|length > 1 %}
<div data-rslider-friends-for="hero-slider"
data-rslider-friends="pagination"
class="hero__pagination"
>
{% for slide in slides %}
<div class="hero__pagination-bullet {% if loop.first %}_active{% endif %}"
data-rslide-friend></div>
{% endfor %}
</div>
{% include '_parts/nav/arrow-left.html.twig' with {
class: 'hero__arrow-left arrow_light',
dataset: 'data-rslider-prev=hero-slider'
} %}
{% include '_parts/nav/arrow-right.html.twig' with {
class: 'hero__arrow-right arrow_light',
dataset: 'data-rslider-next=hero-slider'
} %}
{% endif %}
</div>
</div>
{% include '_parts/hero/_hero-slider-info.html.twig' with {
class: 'hero__slider-info',
heroSettings: heroSettings
} %}
</div>
</div>
{% include '_parts/hero/_hero-info.html.twig' with {
class: 'hero__info',
heroSettings: heroSettings
} %}
</div>
{% endif %}