{% set linkIsDefined = link is defined %}
{% set buttonIsDefined = button is defined %}
{% set externalLinkDefined = externalLink is defined and externalLink %}
<div class="image-text-section mt-3 mb-5 my-md-3 {{ backgroundColorClass ?? '' }}">
<div class="container py-3 py-md-5">
<div class="row gx-0 gx-lg-5">
<div class="col-12 col-lg-6 order-2 order-lg-{{ order.text ?? '1' }}">
{% if (link.enabled|default(false)) %}
<div class="d-flex flex-column justify-content-between h-100">
{% endif %}
<div>
{% if (title is defined) %}
<h2 class="mb-3 mb-md-5 point {{ darkPoint|default(false) ? 'dark' : 'light' }}">{{ title }}</h2>
{% endif %}
<div class="mb-4 {{ title is not defined ? 'teaser-text' : '' }}">{{ text|raw }}</div>
</div>
{% if (buttonIsDefined) %}
{% if (button.withIcon is defined and button.withIcon) %}
{{ include('@components/button-with-icon.html.twig', {
text: button.text,
link: {
href: button.link,
external: externalLinkDefined
},
order: {
text: button.order.text|default('1'),
icon: button.order.icon|default('2')
}
}) }}
{% else %}
{{ include('@components/button.html.twig', {
text: button.text,
link: {
href: button.link|default('#')
},
}) }}
{% endif %}
{% endif %}
{% if (linkIsDefined) %}
{{ include('@components/link.html.twig', {
link: link.link|default('#'),
text: link.text|default('')
}) }}
{% endif %}
{% if (link.enabled|default(false)) %}
</div>
{% endif %}
</div>
<div class="col-12 col-lg-6 mb-4 mb-lg-0 order-1 order-lg-{{ order.image ?? '2' }}">
{% if (imageIsIcon is defined and imageIsIcon) %}
{% if image is defined and image %}
<img style="width: 14rem; height: 14rem;" class="d-block mx-auto" src="{{ image }}" alt="">
{% endif %}
{% elseif (imageAsBackground is defined and imageAsBackground) %}
<div class="ratio ratio16x9 position-relative" style="height: 20rem">
<div class="image position-absolute w-100 h-100 top-0" style="background-image: url('{{image}}'); background-size: cover; background-position: center; background-repeat: no-repeat"></div>
</div>
{% else %}
{% if image %}
<img class="d-block w-100" src="{{ image }}" alt="">
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>