{% set isDecor = isDecor|default(false) %}
{% set isSurface = isSurface|default(false) %}
{% set content = content|default(null) %}
{% set contactButton = contactButton|default(false) %}
{% set cartButton = cartButton|default(false) %}
{% set event = event ?? '' %}
{% set showCountryDisclaimer = false %}
{% set characteristics = characteristics is defined ? characteristics : null %}
<div class="js-affix__placeholder">
<section class="box-details js-affix" data-affix-offset="159">
<div class="box-details__box">
<h4 class="box-details__title mb-0">{{ title }}</h4>
<div class="text-gray-650 fs-sm mb-4">{{ subtitle }}</div>
{% if formats|default(false) %}
<b>{{ 'detail.formats'|trans }}</b>
<ul>
{% for format in formats %}
<li>{{ format }}</li>
{% endfor %}
</ul>
{% endif %}
{% if isDecor %}
{% if decor.direction %}
{{ ('decor.direction.' ~ decor.direction) | trans }}<br>
{% endif %}
{% if decor.surfacesInterior is not empty %}
{{ 'decor.standard.surfaces.interior' | trans }}
{{ decor.surfacesInterior | map(surface => "#{surface.title}") | join(', ') }}<br>
{% endif %}
{% if decor.surfacesExterior is not empty %}
{{ 'decor.standard.surfaces.exterior' | trans }}
{{ decor.surfacesExterior | map(surface => "#{surface.title}") | join(', ') }}<br>
{% endif %}
{% if decor.moreSurfacesInterior is not empty %}
{{ 'decor.more.surfaces.interior' | trans }}
{{ decor.moreSurfacesInterior | map(surface => "#{surface.title}") | join(', ') }}<br>
{% endif %}
{% if decor.moreSurfacesExterior is not empty %}
{{ 'decor.more.surfaces.exterior' | trans }}
{{ decor.moreSurfacesExterior | map(surface => "#{surface.title}") | join(', ') }}<br>
{% endif %}
{% if decor.ncsCode or decor.ralNr or decor.colorCode %}
<div class="mb-4">
<b>{{ 'detail-sidebar.colors'|trans }}</b>
{% if decor.ncsCode %}
<br>{{ 'detail-decor.NCS' | trans }} {{ decor.ncsCode }}
{% endif %}
{% if decor.ralNr %}
<br>{{ 'detail-decor.RAL' | trans }} {{ decor.ralNr }}
{% endif %}
{% if decor.colorCode %}
<br>{{ 'detail-decor.CMYK' | trans }} {{ decor.colorCode }}
{% endif %}
{% if decor.ncsCode and decor.ralNr and decor.colorCode %}
{# TK #}
<br> {{ 'detail-decor.NCS-RAL-CMYK' | trans }}
{% endif %}
</div>
{% endif %}
{% endif %}
{% if content %}
<div class="mb-4">
{{ content|raw }}
</div>
{% endif %}
{% if not isDecor and not isSurface %}
{% if featureItems %}
<ul class="list-unstyled row gy-3 vertical-gutter mt-md-3 mt-2">
{% for item in featureItems %}
<li class="col-6">
{{ include('includes/utils/icon-text.html.twig', {
item: item,
}) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% if deliveryProgramLink %}
<div class="mb-4">
<a href="{{ deliveryProgramLink }}" class="btn btn-outline-primary btn-pdf w-100 mt-4"><span
class="icon icon-info me-2"
aria-hidden="true"></span> {{ 'product.supply-range-button'|trans }}
</a>
</div>
{% endif %}
{% if isDecor and relatedSurfaces is not empty %}
{% set showCountryDisclaimer = true %}
<div class="mb-4 js-show-all">
<b>{{ 'detail-sidebar.Surfaces' |trans }}</b>
<div class="d-flex flex-wrap gap-2 show-all__content js-show-all__content" data-show-all-max-height="76" data-show-all-max-height-mobile="56">
{% for surface in relatedSurfaces %}
<a href="{{ linkGenerator(surface) }}"
class="btn btn-outline-primary px-2 py-0">{{ surface.title }}</a>
{% endfor %}
</div>
<button type="button" class="btn-no-styling show-all__btn js-show-all__btn fst-italic text-gray-650 d-none mt-1">
<span class="show-all__btn-open">{{ 'detail-sidebar.show all' | trans }} ({{ relatedSurfaces | length }})</span>
<span class="show-all__btn-close">{{ 'detail-sidebar.show less' | trans }}</span>
</button>
</div>
{% endif %}
{% if isSurface and relatedDecors is not empty %}
{% set showCountryDisclaimer = true %}
<div class="mb-4 js-show-all">
<b>{{ 'detail-sidebar.Decors' |trans }}</b>
<div class="d-flex flex-wrap gap-2 show-all__content js-show-all__content" data-show-all-max-height="76" data-show-all-max-height-mobile="56">
{% for decor in relatedDecors %}
<a href="{{ linkGenerator(decor) }}"
class="btn btn-outline-primary px-2 py-0">{{ decor.decorNr }} {{ decor.webTitle ?? decor.title }}</a>
{% endfor %}
</div>
<button type="button" class="btn-no-styling show-all__btn js-show-all__btn fst-italic text-gray-650 d-none mt-1">
<span class="show-all__btn-open">{{ 'detail-sidebar.show all' | trans }} ({{ relatedDecors | length }})</span>
<span class="show-all__btn-close">{{ 'detail-sidebar.show less' | trans }}</span>
</button>
</div>
{% endif %}
{% if relatedMaterialGroups is not empty%}
{% set showCountryDisclaimer = true %}
<div class="mb-4 js-show-all">
<b>{{ 'detail-sidebar.materialGroups'|trans }}</b>
<div class="d-flex flex-wrap gap-2 show-all__content js-show-all__content" data-show-all-max-height="76" data-show-all-max-height-mobile="56">
{% for materialGroup in relatedMaterialGroups %}
{% if materialGroup.relatedDocument %}
<a href="{{ materialGroup.relatedDocument.fullPath }}"
class="btn btn-outline-primary px-2 py-0">{{ materialGroup.title }}</a>
{% else %}
<span
class="btn btn-outline-primary px-2 py-0 pe-none">{{ materialGroup.title }}</span>
{% endif %}
{% endfor %}
</div>
<button type="button" class="btn-no-styling show-all__btn js-show-all__btn fst-italic text-gray-650 d-none mt-1">
<span class="show-all__btn-open">{{ 'detail-sidebar.show all' | trans }} ({{ relatedMaterialGroups | length }})</span>
<span class="show-all__btn-close">{{ 'detail-sidebar.show less' | trans }}</span>
</button>
</div>
{% endif %}
{% if showCountryDisclaimer %}
<div class="mb-4">
<span>{{ 'detail-sidebar.countryDisclaimer'|trans }}</span>
</div>
{% endif %}
</div>
<form action="/404" data-action="{{ app.request.pathInfo }}?ajax=1&update=1" class="js-cart__form"
data-cart-one-add="true">
<input type="hidden" name="productId" value="123">
<div class="box-details__footer row g-0">
<!-- Varianten für mögliche Konstellationen, je nachdem welchen Button es gibt/nicht gibt -->
{% if contactButton and cartButton and siteConfig().contactPage %}
<div class="col-6">
{{ _self.contactButton(event) }}
</div>
<div class="col-6">
{{ _self.cartButton() }}
</div>
{% elseif contactButton and siteConfig().contactPage %}
<div class="col-12">
{{ _self.contactButton(event) }}
</div>
{% elseif(cartButton) %}
<div class="col-12">
{{ _self.cartButton() }}
</div>
{% endif %}
</div>
</form>
{% if characteristics %}
{{ include('includes/title-blocks/title-block.html.twig', {
title: 'surface.characteristics' | trans,
titleTag:'h2',
titleStyle:'h3 mt-4',
}, with_context = false) }}
<ul class="list-unstyled d-flex flex-wrap gap-3">
{% for characteristic in characteristics %}
{% if characteristic.icon %}
<li style="height: fit-content;">
<span title="{{ characteristic.title }}" class="icon icon-{{ characteristic.icon }} icon-5x" aria-hidden="true"></span>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</section>
</div>
{% macro cartButton() %}
<button type="submit" class="btn btn-primary btn--no-transition w-100 btn-cart js-cart__add">
<span class="btn__text btn-cart__default">{{ 'detail-sidebar.order preview'|trans }}</span>
<span class="btn-cart__added">
<span class="btn-cart__added-icon icon icon-check" aria-label="Added" aria-hidden="true"></span>
<span class="btn-cart__added-text">{{ 'detail-sidebar.added'|trans }}</span>
</span>
{{ include('loading/loading-overlay.html.twig', {className: 'loading-overlay--centered loading-overlay--btn js-cart__loading', text: null}) }}
</button>
{% endmacro %}
{% macro contactButton(event) %}
<a class="btn btn-outline-primary btn--no-transition w-100 js-smoothscroll__link"
href="{{ siteConfig().contactPage }}"
{% if event == 'click_cta_infobox' %}
data-event-tracking-event="{{ event }}"
data-event-tracking-click_text="{{ 'detail-sidebar.to contactFrom'|trans }}"
data-event-tracking-click_url="{{ siteConfig().contactPage }}"
{% endif %}
><span
class="btn__text">{{ 'detail-sidebar.to contactFrom'|trans }}</span></a>
{% endmacro %}