{% set align = pimcore_select('align').getValue() %}
{% set image = pimcore_image('image1') %}
{% set hasImage = image and image.getSrc() %}
{% set paddingTop = pimcore_select('paddingTop').getValue() %}
{% set paddingBottom = pimcore_select('paddingBottom').getValue() %}
{% set text1 = pimcore_wysiwyg('text1') %}
{% set text2 = pimcore_wysiwyg('text2') %}
{% set textColor = pimcore_select('textColor').getValue() %}
{% set textColorHex = pimcore_input('textColorHex').getValue() %}
{% set bgColor = pimcore_select('bgColor').getValue() %}
{% set bgColorHex = pimcore_input('bgColorHex').getValue() %}
{% set textColor1 = pimcore_select('textColor1').getValue() %}
{% set textColor1Hex = pimcore_input('textColor1Hex').getValue() %}
{% set bgColor1 = pimcore_select('bgColor1').getValue() %}
{% set bgColor1Hex = pimcore_input('bgColor1Hex').getValue() %}
{% set shadow1 = pimcore_checkbox('shadow1').isChecked() %}
{% set padding1 = bgColor1 or bgColor1Hex or shadow1 %}
{% set textColor2 = pimcore_select('textColor2').getValue() %}
{% set textColor2Hex = pimcore_input('textColor2Hex').getValue() %}
{% set bgColor2 = pimcore_select('bgColor2').getValue() %}
{% set bgColor2Hex = pimcore_input('bgColor2Hex').getValue() %}
{% set shadow2 = pimcore_checkbox('shadow2').isChecked() %}
{% set padding2 = bgColor2 or bgColor2Hex or shadow2 %}
<div class="{% if not textColorHex %} {{ textColor }} {% endif %} {% if not bgColorHex %} {{ bgColor }} {% endif %}" style="{% if textColorHex %}color: {{ textColorHex }}; {% endif %} {% if bgColorHex %}background: {{ bgColorHex }}; {% endif %}">
<div class="container px-5 pt-{{ paddingTop }} pb-{{ paddingBottom }}">
<div class="grid grid-cols-5 gap-5 md:gap-10">
<div class="{% if align != 'top' %} col-span-5 md:col-span-3 {% else %} col-span-5 {% endif %} {% if align == 'right' %} order-2 {% endif %}">
<div class="prose colored text-balance {% if not editmode %}fade-in{% endif %} {% if not textColor1Hex %} {{ textColor1 }} {% endif %} {% if not bgColor1Hex %} {{ bgColor1 }} {% endif %} {% if padding1 %} p-5 {% endif %} {% if shadow1 %}shadow-card{% endif %}" style="{% if textColor1Hex %}color: {{ textColor1Hex }}; {% endif %} {% if bgColor1Hex %}background: {{ bgColor1Hex }}; {% endif %}">
{{ text1 | pimcoreObject | raw }}
</div>
</div>
<div class="{% if align == 'shifted' %} md:col-start-3 col-span-5 md:col-span-3 {% else %}{% if align != 'top' %} col-span-5 md:col-span-2 {% else %} col-span-5 {% endif %}{% endif %} {% if align == 'right' %} order-1 {% endif %} {% if not editmode and not hasImage and not text2.getValue() %} hidden {% endif %}">
{% if hasImage %}
<div class="overflow-clip rounded-md {% if text2.getValue() %} mb-5 {% endif %}">
<img src="{{ image.getThumbnail('stageThumbnailMobile').getPath() }}" class="w-full" title="">
</div>
{% if image.image.getMetadata('copyright') %}
<div class="text-xs opacity-50 mt-2">© {{ image.image.getMetadata('copyright') }}</div>
{% endif %}
{% endif %}
<div class="prose colored text-balance {% if not editmode %}fade-in delay-150{% endif %} {% if not textColor2Hex %} {{ textColor2 }} {% endif %} {% if not bgColor2Hex %} {{ bgColor2 }} {% endif %} {% if padding2 %} p-5 {% endif %} {% if shadow2 %}shadow-card{% endif %}" style="{% if textColor2Hex %}color: {{ textColor2Hex }}; {% endif %} {% if bgColor2Hex %}background: {{ bgColor2Hex }}; {% endif %}">
{{ text2 | pimcoreObject | raw }}
</div>
</div>
</div>
</div>
</div>