{% set serviceProvider = destinationPackage is defined ? demi_getServiceProviderForPackage(destinationPackage) : null %}
{% set trackingServiceProvider = trackingServiceProvider is defined ? trackingServiceProvider : null %}
{% set destinationPackage = destinationPackage is defined ? destinationPackage : null %}
{#
//for gallery
// no search date - no date for images
#}
{% set fromDate = searchParam is not defined or searchParam.isNoDate() ? null : demi_getSearchFrom() %}
{% set imageGalleryId = "id_" ~ id %}
{% set lightboxTopBarUrl = demi_demiUrl({'path': document.getFullPath()}, "demi_lightbox_topbar_content") %}
{% set gallerySrcUrl = demi_demiUrl({
'path': 'demi',
'objectId': id,
'thumbnail': 'demi-desktop-gallery',
'thumbSmall': 'demi-desktop-gallery-small',
'dateFrom': fromDate is not null ? fromDate.getTimestamp() : ''
}, "demi_images") %}
{% set firstImageUrl = demi_demiUrl({
'path': 'demi',
'objectId': id,
'thumbnail': 'demi-desktop-offer-list-teaser',
'dateFrom': fromDate is not null ? fromDate.getTimestamp() : ''
}, "demi_image") %}
<section class="card bordered h-100 isClickable js-tracking js-tracking--detail-link-click js-tracking--impression {% if destinationPackage is not null and destinationPackage.getClassName() == 'demiPackage' %} card--package {% endif %}"
{% if accommodation is defined and accommodation is not null %}
data-tracking-name="{{ demi_impressionName(accommodation) }}"
data-tracking-id="{{ accommodation.getId() }}"
data-tracking-category="{{ demi_impressionCategory(serviceProvider is not null ? serviceProvider : trackingServiceProvider ,destinationPackage,searchParam,null,destinationPackage) }}"
data-tracking-position="{{ position }}"
data-tracking-brand="{{ demi_impressionBrand(serviceProvider is not null ? serviceProvider : trackingServiceProvider) }}"
data-tracking-list="{{ constant('Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_LIST') }} {{ constant('Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_PACKAGE_ACCODETAIL') }}"
{% endif %}
data-tracking-price="{{ price | number_format(2, '.', '') }}"
>
<div class="card-body d-flex flex-column">
<script type="text/javascript" data-cookieconsent="ignore">
_config.lightbox = true;
_config.lazyImg = true;
</script>
{% if img is defined and img is not null %}
<div class="embed-responsive embed-responsive-3by2">
{{ img.getThumbnail('demi-desktop-offer-list-teaser').getHtml({'imgAttributes': {"class":"embed-responsive-item"}})|raw }}
{% if useGal and accommodation is defined and accommodation is not null %}
<button type="button" class="btn-show-gallery btn-no-styling js-lightbox-group-dyn"
aria-label="{{ 'demi.detail.open-gallery'|trans }}"
title="{{ 'demi.detail.open-gallery'|trans }}"
data-lightbox-id="{{ imageGalleryId }}"
data-lightbox-src-url="{{ gallerySrcUrl }}"
data-lightbox-topbar-content-url="{{ lightboxTopBarUrl }}?ajax=1&id={{ accommodation.getId() }}{% if destinationPackage is not null and destinationPackage.getClassName() == 'demiPackage' %} &tid={{ id }}{% else %}&pid={{ id }}{% endif %}"
data-lightbox-topbar-wrapper="#lightboxTopBar"
data-sub-html="{{ demi_getNameAndCopyrightForImage(img) }}">
<span class="js-lightbox-group-dyn__icon demi-icon demi-icon-search btn-show-gallery__icon" aria-hidden="true"></span>
<span class="js-lightbox-group-dyn__loading" hidden>
<span class="text-center d-block">
<span class="circle-spinner circle-spinner--white"
aria-label="{{ 'demi.content-loading'|trans }}"
title="{{ 'demi.content-loading'|trans }}"></span>
</span>
</span>
</button>
{% endif %}
</div>
{% endif %}
<h4 class="text-primary mb-1 mt-3">
<a href="{{ href }}">{{ title }}</a>
</h4>
{% if text is defined %}
<div class="mb-2">
{{ text|raw }}
</div>
{% endif %}
<div class="mb-2 mt-auto"><hr class="hr--border-gray m-0"></div>
<div class="row align-items-center">
<div class="col">
{% if priceInfo is defined %}
<div class="small text-muted">
{{ priceInfo | raw }}
</div>
{% endif %}
{% if specialPrice is defined %}
<div class="small text-muted">
{{ specialPrice | raw }}
</div>
{% endif %}
</div>
{% if price > 0 %}
<div class="col col-auto">
<a href="{{ href }}" class="btn btn-success">{{ 'demi.price-from-short'|trans }} <strong class="fz17 price">{{ demi_paymentGetPriceObject(price, serviceProvider) }}</strong></a>
</div>
{% endif %}
</div>
</div>
</section>