{% embed 'app/area-brick-layout.html.twig' %}
{% block content %}
<!-- Locations primary -->
<section class="{{ sectionClass ?? '' }}">
<div class="{{ containerClass ?? 'container py-10' }}">
<div class="relative {{ widthClass ?? (pimcore_image('image').isEmpty() ? 'lg:w-1/2' : '') }}">
<div class="relative {{ gridClass ?? '' }} z-10 w-full grid grid-cols-2 gap-6 p-10 overflow-hidden bg-gray-200 rounded-md {{ pimcore_image('image').isEmpty() ? '' : 'md:mb-10' }}">
<div class="col-span-2 {{ pimcore_image('image').isEmpty() ? '' : 'md:col-span-1' }}">
<span class="block mb-3 text-lg font-bold">
{{ pimcore_input('subtitle', { placeholder: 'Subtitel' }) }}
</span>
<h2 class="text-3xl font-bold mb-7">
{{ pimcore_input('title', { placeholder: 'Titel' }) }}
</h2>
<div class="flex flex-col gap-4">
{% if editmode %}
{{ pimcore_input('phone', { placeholder: 'Telefoonnummer' }) }}
{% elseif not pimcore_input('phone').isEmpty() %}
<a
href="tel:{{ pimcore_input('phone') | phone }}"
class="flex font-bold text-blue hover:underline"
>
<span class="flex items-center justify-center w-6 h-6 mr-2 bg-white rounded-full shadow-md">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><path fill="currentColor" fill-rule="evenodd" d="m13.47 9.12-2.8-.7a.703.703 0 0 0-.752.292L8.126 11.4A11.959 11.959 0 0 1 2.6 5.874l2.688-1.792a.7.7 0 0 0 .291-.752l-.7-2.8A.7.7 0 0 0 4.2 0H.7a.7.7 0 0 0-.7.7C.01 8.042 5.958 13.99 13.3 14a.7.7 0 0 0 .7-.7V9.8a.7.7 0 0 0-.53-.68Z"/></svg>
</span>
{{ pimcore_input('phone') }}
</a>
{% endif %}
{% if editmode %}
{{ pimcore_input('contact-text', { placeholder: 'Contact pagina tekst' }) }}
{% if not document.getProperty('contactPage') %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Er is nog geen contactpagina ingesteld. {% endblock %}
{% block information %}
Stel op de hoofdpagina van de huidige taal de 'contactPage' property in.
{% endblock %}
{% endembed %}
{% endif %}
{% elseif document.getProperty('contactPage') and not pimcore_input('contact-text').isEmpty() %}
<a
href="mailto:{{ pimcore_input('contact-text') }}?subject={{ 'Contactaanvraag via website'|trans|url_encode }}"
target="_blank"
class="flex font-bold text-blue hover:underline"
>
<span class="flex items-center justify-center w-6 h-6 mr-2 bg-white rounded-full shadow-md">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12"><path fill="currentColor" fill-rule="evenodd" d="M1.4 9.8V3.877l5.316 2.362a.7.7 0 0 0 .568 0L12.6 3.877V9.8H1.4Zm11.2-8.4v.945L7 4.834 1.4 2.345V1.4h11.2ZM14 2.786V.7a.7.7 0 0 0-.7-.7H.7a.7.7 0 0 0-.7.7v9.8a.7.7 0 0 0 .7.7h12.6a.7.7 0 0 0 .7-.7V2.786Z"/></svg>
</span>
{{ pimcore_input('contact-text') }}
</a>
{% endif %}
{% if editmode %}
{{ pimcore_textarea('address', { placeholder: 'Adres' }) }}
{% elseif not pimcore_textarea('address').isEmpty() %}
<a
href="https://maps.google.com/?q={{ pimcore_textarea('address') | replace({ "\n": '%20', ' ': '%20' }) }}"
target="_blank"
class="flex text-blue hover:underline"
>
<span class="mr-3.5">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="24"><path fill="currentColor" fill-rule="evenodd" d="M9.73.039a8.441 8.441 0 0 1 6.836 4.757 8.986 8.986 0 0 1-.465 8.856l-6.232 9.792a1.2 1.2 0 0 1-2.025 0l-6.231-9.792a8.988 8.988 0 0 1-.465-8.856A8.442 8.442 0 0 1 7.984.039a9.86 9.86 0 0 1 1.746 0Zm-.873 5.96a2.4 2.4 0 1 0 0 4.8 2.4 2.4 0 0 0 0-4.8Z"/></svg>
</span>
{{ pimcore_textarea('address') | nl2br }}
</a>
{% endif %}
</div>
</div>
{% if (imageEnabled ?? true) and editmode or not pimcore_image('image').isEmpty() %}
<div class="col-span-2 md:col-span-1">
{{ pimcore_image('image', {
thumbnail: 'contact-business-card',
pictureAttributes: {class: 'block rounded-md overflow-hidden'},
imgAttributes: {class: 'w-full h-full'},
reload: true,
}) }}
</div>
{% endif %}
</div>
{% if not pimcore_image('image').isEmpty() %}
<div class="hidden md:block flex items-end md:h-[186px] md:absolute -mb-10 md:-mr-10 bg-blue-200 px-8 py-11 w-full placeholder-gray-200 rounded-b-md md:rounded-md md:-bottom-0 md:-right-0"></div>
{% endif %}
</div>
</div>
</section>
{% endblock %}
{% endembed %}