<?php
/** @var \Magento\Framework\View\Element\Template $block */
/** @var \Dotdigitalgroup\Email\Helper\Data $helper */
?>
<?php $helper = $this->helper(\Dotdigitalgroup\Email\Helper\Data::class); ?>

<?php if ($helper->isEasyEmailCaptureForNewsletterEnabled()) : ?>
    <script type="text/x-magento-init">
    {
        "*": {
            "Dotdigitalgroup_Email/js/emailCapture":{
                "type":"newsletter",
                "url":"<?= $block->escapeHtml($helper->getEmailCaptureUrl()); ?>"
            }
        }
    }
    </script>
<?php endif; ?>