{% if packages is not defined %}{% set packages = null %}{% endif %}
{% if destinationPackages is not defined %}{% set destinationPackages = null %}{% endif %}
<section class="container" data-track-content data-content-name="accommodation-packages">
<h2 class="h3 mb-2">{{ "demi.detail.package-offers"|trans }}</h2>
<div class="js-search-data__show-if-submitted mb-3" {{ availabilityIsChecked ? '' : 'hidden' }}>
{{ include('@ElementsDemiFrontend/Accommodation/includes/acco-detail-searchInfo.html.twig') }}
{{ include('@ElementsDemiFrontend/Accommodation/includes/corridor-matrix.html.twig', {
'styleModifier': 'pt-3',
'type': 'packages'
}) }}
</div>
<div class="js-room-list" aria-live="polite">
<div class="card box-shadow js-room-list__loading" hidden>
<div class="card-body text-center py-5">
{{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
</div>
</div>
<div class="card box-shadow js-room-list__content" data-list="packages">
{% if packages is not empty or (destinationPackages is not empty and demi_core_configuration('getShowDestinationPackagesOnAccoDetail',[])) %}
<ul class="list-unstyled">
{% set position = 1 %}
{% if packages is not empty %}
{% for package in packages %}
<li>
{% set productKey = demi_getCheapestProducts(package.getProducts()) %}
{% set productKeys = package.getProducts()|keys %}
{% set firstProductId = productKeys[productKey] %}
{{ include('@ElementsDemiFrontend/Includes/teaser/package-teaser.html.twig', {
'housePackageMaster': pimcore_object(package.getHousePackageMasterId()),
'cheapestProducts': [package.getProduct(firstProductId)],
'accommodation': accommodation,
'position': position}) }}
<hr class="m-0 hr--light hr--bold">
</li>
{% set position = position + 1 %}
{% endfor %}
{% endif %}
{% if destinationPackages is not empty and demi_core_configuration("getShowDestinationPackagesOnAccoDetail",[]) and not isAffiliate %}
{% for package in destinationPackages %}
<li>
{{ include('@ElementsDemiFrontend/Includes/teaser/destinationPackage-teaser.html.twig', {
'destinationPackage': package,
'accommodation': accommodation,
'position': position})
}}
<hr class="m-0 hr--light hr--bold">
</li>
{% set position = position + 1 %}
{% endfor %}
{% endif %}
</ul>
{% endif %}
</div>
</div>
<div class="js-corridor__room-packages"></div>
</section>