<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/* @var $block \Magento\Catalog\Block\Product\View\Options */
?>

<?php $_options = $block->decorateArray($block->getOptions()) ?>
<?php $_productId = $block->getProduct()->getId() ?>
<?php if (count($_options)):?>
<script type="text/x-magento-init">
    {
        "#product_addtocart_form": {
            "priceOptions": {
                "optionConfig": <?php /* @escapeNotVerified */ echo $block->getJsonConfig()?>,
                "controlContainer": ".field",
                "priceHolderSelector": "[data-product-id='<?php echo $block->escapeHtml($_productId)?>'][data-role=priceBox]"
            }
        }
    }
</script>
    <?php foreach ($_options as $_option): ?>
        <?php echo $block->getOptionHtml($_option) ?>
    <?php endforeach; ?>
<?php endif; ?>
