{% from '@openform_front_templates/_includes/_icons.html.twig' import fullscreen, zoomin, zoomout, sliderprev, slidernext, arrowright, copyrights, info %}
{% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
<section class="collections-mobile js-collections">
<div class="collections-mobile__header" style="background: {{rootParent.headerBackground|default('#F8F7F0') }};">
{% if rootParent.isExhibition is defined %}
{% set href = toolkit_route_localizer.generate('exhibition_item', { 'slug': rootParent.Translation[app.request.locale].slug}, app.request.locale) %}
{% endif %}
{% if href is defined %}
<a class="collections-mobile__header__title" href="{{href}}">{{rootParent.Translation[app.request.locale].titleHtml|raw}}</a>
{% endif %}
{% set href = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %}
<a class="collections-mobile__header__title" href="{{href}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
</div>
<div class="collections-mobile__arrows" style="background: {{entity.background|default('#F1ECC5') }};">
{% for key, Relict in entity.RelictPack.getVisibleRelicts(app.request.locale) %}
{% if entity.id == Relict.id %}
{% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] is defined %}
{% set prevElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key - 1] %}
{% set href = toolkit_route_localizer.generate('relict_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
<a href="{{href}}" class="slider-nav__btn slider-nav__btn--prev">
{{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
</a>
{% else %}
<div>
</div>
{% endif%}
{% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
<div class="collections-mobile__arrows__title">
{{ entity.Translation[app.request.locale].titleHtml|raw }}
</div>
{% endif %}
{% if entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] is defined %}
{% set nextElement = entity.RelictPack.getVisibleRelicts(app.request.locale)[key + 1] %}
{% set href = toolkit_route_localizer.generate('relict_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
<a href="{{href}}" class="slider-nav__btn slider-nav__btn--next">
{{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
</a>
{% else %}
<div>
</div>
{% endif%}
{% endif %}
{% endfor %}
</div>
<div class="collections-mobile__gallery" style="background:{{entity.imageBackgroundColor|default('#FFFFFF') }};">
{% if ImageSlides|length > 0 %}
<div class="js-collection-gallery-standard" >
<div class="splide js-collections-gallery-mobile collection-gallery" aria-label="Galeria" >
<div class="splide__track">
<ul class="splide__list" >
{% for key, image in ImageSlides %}
{% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
{# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','template8') %} #}
{% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
<li class="splide__slide" >
<div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}">
<div class="collection-gallery__item" style="width: 100%; aspect-ratio: 431 / 317;">
<div class="my-zoomist" data-zoomist-src="{{img}}" data-alt="{{image.Translation[app.request.locale].alt}}"></div>
</div>
<div class="collection-gallery__wrap">
<div class="collection-gallery__buttons">
{% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
<div class="object__info-wrap">
<button class="collection-gallery__buttons__btn" tabindex="0" aria-expanded="false" data-expanded="js-desc-{{key}}" data-efecthover=".js-desc-{{key}}">{{info(('T_DESC')|trans({}, 'openform_front', app.request.locale))}}</button>
<div class="object__info object__info--desc block__text js-desc-{{key}}" data-lenis-prevent>{{image.Translation[app.request.locale].text|raw}}</div>
</div>
{% endif %}
{% if image.Translation[app.request.locale].copyrights is defined and image.Translation[app.request.locale].copyrights %}
<div class="object__info-wrap">
<button class="collection-gallery__buttons__btn" tabindex="0" aria-expanded="false" data-expanded="js-info-{{key}}" data-efecthover=".js-info-{{key}}">{{copyrights(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
<div class="object__info block__text js-info-{{key}}">{{image.Translation[app.request.locale].copyrights}}</div>
</div>
{% endif %}
<button class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0" data-color="{{image.imageBackgroundColor is defined and image.imageBackgroundColor ? image.imageBackgroundColor }}"
data-image="{{img}}"
data-description="{{image.Translation[app.request.locale].text}}"
data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
data-start="{{key}}"
data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
>
{{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
</button>
<button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
<button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
<div class="splide__arrows js-slider-nav">
<div class="slider-nav collections-mobile__gallery__nav">
<button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
{{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
</button>
<div class="slider-nav__info">
<span class="slider-nav__info__current js-slider-nav-current" aria-label="{{ 'CURRENT_PAGE'|trans({}, 'openform_front', app.request.locale) }}"></span><span class="slider-nav__info__all">/</span><span aria-label="{{ 'ALL_PAGE'|trans({}, 'openform_front', app.request.locale) }}" class="js-slider-nav-all slider-nav__info__all"></span>
</div>
<button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
{{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
</button>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class="collections-mobile__content" style="background: {{rootParent.headerBackground|default('#F1ECC5') }};">
{% if entity.link is defined and entity.link %}
<a href="{{entity.link}}" class="block-text__btns__btn button-read-more button-read-more--black">
<span>{{('T_RELICT_LINK')|trans({}, 'openform_front', app.request.locale)}}</span>
{{arrowright()}}
</a>
{% endif %}
{% if entity.Translation[app.request.locale].text is defined and entity.Translation[app.request.locale].text %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].text|raw }}
</div>
{% endif %}
{% if entity.Translation[app.request.locale].description is defined and entity.Translation[app.request.locale].description %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].description|raw }}
</div>
{% endif %}
{% if entity.filePath is defined and entity.filePath and openform_front_util.isMp3File(entity.filePath) %}
<div class="block-image__image__audio">
<div class="block-audio__player">
<audio controls class="js-audio-player block-audio__inner">
<source src="{{ entity.filePath }}">
Your browser does not support the audio element.
</audio>
</div>
</div>
{% endif %}
{% if entity.Translation[app.request.locale].attributesText is defined and entity.Translation[app.request.locale].attributesText %}
<div class="collections__content__text block__text">
{{ entity.Translation[app.request.locale].attributesText|raw }}
</div>
{% endif %}
</div>
</section>