<?php
/** @var \Dotdigitalgroup\Email\Block\EmailCapture\EmailCaptureForCheckout $block */
?>
<?php if ($block->isEasyEmailCaptureEnabled() || $block->isWebBehaviourTrackingEnabled()): ?>
    <script type="text/x-magento-init">
    {
        "*": {
            "Dotdigitalgroup_Email/js/emailCapture":{
                "type":"checkout",
                "url":"<?= $block->escapeUrl($block->getEmailCaptureUrl()); ?>",
                "enabled": "<?= $block->escapeJs($block->isEasyEmailCaptureEnabled()) ?>"
            }
        }
    }

    </script>
<?php endif; ?>
