{% if '-' in id %}
{% set parts = id|split('-') %}
{% set realId = parts[1] %}
{% endif %}
{% set object = pimcore_object(realId is defined ? realId : id) %}
{% set ariaLabel = 'demi.booking.offer.offer'|trans ~ ': ' ~ object.getName() %}
{% set serviceProvider = object is instanceof('\Pimcore\Model\DataObject\DemiHousePackageMaster') ? object.getServiceProvider() : object.getParent().getParent() %}
{% set trackingServiceProvider = serviceProvider %}
{% set serviceProvider = serviceProvider is instanceof('\Elements\Demi\Model\AccommodationServiceProvider') ? serviceProvider : null %}
{% if opensOverlay %}
<script>
_config.overlay = true;
</script>
{% endif %}
<section class="card-body {{ opensOverlay ? 'js-overlay__toggle': 'isClickable' }} js-tracking js-tracking--impression {% if object is instanceof('\Elements\Demi\Model\Package') %}card--package{% endif %}"
{% if opensOverlay %}
data-target="#overlay-{{ id }}" tabindex="-1"
{% endif %}
{% set trackingCategory = constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::CATEGORY_ZUSATZLEISTUNGEN_GENERIC") %}
{% set trackingList = constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_ZUSATZLEISTUNGEN") %}
{% set trackingVariant = object.getName() %}
{% if object is instanceof('\Elements\Demi\Model\HousePackageMaster') %}
{% set trackingCategory = demi_impressionCategory(trackingServiceProvider,object,searchParam) %}
{% set trackingList = constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_LIST") ~ " " ~ constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_PACKAGE_ACCODETAIL") %}
{% elseif object is instanceof('Elements\Demi\Model\Package') %}
{% set trackingList = constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::LIST_ZUSATZLEISTUNGEN_DESTINATIONPACKAGE") %}
{% set trackingCategory = constant("Elements\\Bundle\\DemiFrontendBundle\\Service\\Tracking::CATEGORY_ZUSATZLEISTUNGEN_GENERIC") %}
{% set trackingVariant = object.getName() ~ "/" %}
{% elseif object is instanceof('\Elements\Demi\Model\AdditionalProduct') %}
{% set trackingCategory = demi_impressionCategory(trackingServiceProvider,null,searchParam,null,object) %}
{% endif %}
data-tracking-name="{{ demi_impressionName(trackingServiceProvider) }}"
data-tracking-id="{{ trackingServiceProvider.getId() }}"
data-tracking-category="{{ trackingCategory }}"
data-tracking-position="{{ position }}"
data-tracking-brand="{{ demi_impressionBrand(trackingServiceProvider) }}"
data-tracking-list="{{ trackingList }}"
data-tracking-price="{{ price | number_format(2, '.', '') }}"
data-tracking-variant="{{ trackingVariant|escape }}"
>
<div class="row row--gutter-width-10">
{% if img is defined and img is not null %}
<div class="col col-auto">
{{ img.getThumbnail('demi-mobile-offer-list-teaser').getHtml()|raw }}
</div>
{% endif %}
<div class="col">
<h3 class="text-primary mb-1">
{% if opensOverlay %}
<button type="button" class="btn-no-styling">{{ title }}</button>
{% else %}
<a href="{{ href }}">{{ title }}</a>
{% endif %}
</h3>
{% if priceInfo is defined %}
{% set text = text ~ priceInfo %}
{% endif %}
{% if text is empty and ticket is not empty %}
{% set text = 'demi.booking.ticket'|trans %}
{% endif %}
{% if text is not empty %}
<div class="wysiwyg">
{{ text|raw }}
</div>
{% endif %}
<hr class="my-1">
<div class="row align-items-baseline">
<div class="col">
{% if specialPrice is defined and specialPrice is not empty %}
<div class="text-muted">
{{ specialPrice }}
</div>
{% endif %}
</div>
<div class="col-auto">
<div class="text-right text-success font-bold">
<span class="demi-icon demi-icon-cart fz14 mr-1"></span>
{% set ticketPriceText = 'demi.booking.cart.ticket-price-text'|trans|trim %}
{% if ticket is defined and ticket is not null and ticketPriceText != 'demi.booking.cart.ticket-price-text' %}
{{ ticketPriceText }}
{% else %}
{% if price > 0 %}
{{ 'demi.price-from-short'|trans }} <strong class="fz17 price">{{ demi_paymentGetPriceObject(price, serviceProvider) }}</strong>
{% else %}
{{ 'demi.booking.free-bookable'|trans }}
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
<div class="col col-auto align-self-center">
{% if opensOverlay %}
<button class="btn-no-styling text-primary demi-icon demi-icon-chevron-right increased-click-area"
type="button"
title="{{ ariaLabel }}"
aria-label="{{ ariaLabel }}"></button>
{% else %}
<a class="btn-no-styling text-primary demi-icon demi-icon-chevron-right increased-click-area"
href="{{ href }}"
title="{{ ariaLabel }}"
aria-label="{{ ariaLabel }}"></a>
{% endif %}
</div>
</div>
</section>