<?php
/** @var \Magento\Framework\View\Element\Template $block */
/** @var \Banyo\CustomHomePage\ViewModel\WeGetIt $viewModel */
$viewModel = $block->getData('viewModel');
$heading = $viewModel->getConfigValue('we_get_it_heading');
$paragraph = $viewModel->getConfigValue('we_get_it_paragraph');
$buttonText = $viewModel->getConfigValue('we_get_it_button');
$imageUrl = $viewModel->getImageUrl('banyo_theme/we_get_it_homepage/we_get_it_homepage_image');

?>

<section class="py-8 hidden">
    <div class="2xl:container mx-auto px-3 3xl:max-w-screen-2xl">
        <div class="md:flex justify-center items-center bg-white">
            <div class="md:w-1/2">
                <?php if ($imageUrl): ?>
                    <img src="<?= $escaper->escapeUrl($imageUrl) ?>" alt="We Get It" class="w-full" />
                <?php endif; ?>
            </div>
            <div class="flex flex-col items-start justify-center px-4 py-6 md:p-6 md:w-1/2 gap-3">
                <?php if ($heading): ?>
                    <div class="text-2xl lg:text-4xl font-bold pb-5"><?= $escaper->escapeHtml($heading) ?></div>
                <?php endif; ?>

                <?php if ($paragraph): ?>
                    <div class="text-base"><?= $escaper->escapeHtml($paragraph) ?></div>
                <?php endif; ?>

                <?php if ($buttonText): ?>
                    <a href="#" class="pt-4 bg-primary-darker text-white hover:shadow px-6 py-4">
                        <?= $escaper->escapeHtml($buttonText) ?>
                    </a>
                <?php endif; ?>
            </div>

        </div>
    </div>
</section>
