{% from 'utils.html.twig' import ico, imgUpload %}
{% if isModuleActive('banner_module') and banners|length > 0 %}
{% set bannerFull = getConfig('banner_full') %}
{% set bannerClass = bannerFull? 'home-banner-full':'home-banner' %}
{% set bannerOption = bannerFull? 'home-banner-full':'' %}
{% set bannerAfter = searchAfterBanner? 'banner-search-after':'banner-search-apart' %}
<div class="{{ ['banner', bannerClass, bannerAfter]|join(' ') }}" data-status="loading">
{% if not bannerFull %}
<div class="container banner-container mobile--wid">
{% endif %}
<div class="js--slider banner-slider" id="banner-slider" data-slider-options-label="banner-slider">
{% for banner in banners %}
<div class="banner-item">
<div class="item-box">
{% if banner.link %}
<a href="{{ banner.link }}">
{% endif %}
{{ imgUpload(banner.image, enum('AbstractEnum::PATH_OTHERS'), bannerOption, banner.title)}}
{% if isDarkTheme %}
<div class="banner-mask"></div>
<div class="banner-mask-bottom-before"></div>
{% endif %}
<div class="legend">
{% if banner.title != null %}
{# <p class="title">{{ banner.title }} {{ banner.title }} {{ banner.title }}</p> #}
<p class="title">{{ banner.title }}</p>
{% endif %}
{% if banner.subtitle != null %}
<p class="subtitle">{{ banner.subtitle }}</p>
{% endif %}
</div>
{% if banner.link %}
</a>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div id="banner-nav-dots" class="banner-nav-dots">
{% for ind in range(1, banners|length) %}
<button></button>
{% endfor %}
</div>
<div id="banner-seta-prev" class="banner-seta banner-seta-prev">{{ ico('chevron-left') }}</div>
<div id="banner-seta-next" class="banner-seta banner-seta-next">{{ ico('chevron-right') }}</div>
{% if not bannerFull %}</div>{% endif %}
</div>
{% if isDarkTheme %}
<div class="banner-mask-bottom-after">
<div></div>
</div>
{% endif %}
{% endif %}