<?php
/** @var \Dotdigitalgroup\Email\Block\Roi $block */
?>

<?php if ($block->isRoiTrackingAvailable()): ?>
<script>
    require.config({
        paths: {
            'dmmpt':  "<?= $block->escapeUrl($block->getPageTrackingUrlForSuccessPage()) ?>"
        }
    });
</script>
<script type="text/x-magento-init">
    {
        "*": {
            "dmmpt": {},
            "Dotdigitalgroup_Email/js/roiCode": {
                "total": "<?= $block->escapeHtml($block->getTotal()); ?>",
                "items": <?= /* @noEscape */ $block->getProductNames(); ?>
            }
        }
    }
</script>
<?php endif; ?>
