<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
//"swatchRenderer": {
?>
<?php /** @var $block \Magento\Swatches\Block\Product\Renderer\Configurable */ ?>
<div class="swatch-opt" data-role="swatch-options"></div>

<script type="text/x-magento-init">
    {
        "[data-role=swatch-options]": {
            "Magento_Swatches/js/swatch-renderer": {
                "jsonConfig": <?php /* @escapeNotVerified */ echo $swatchOptions = $block->getJsonConfig(); ?>,
                "jsonSwatchConfig": <?php /* @escapeNotVerified */
                    echo $swatchOptions = $block->getJsonSwatchConfig(); ?>,
                "mediaCallback": "<?php /* @escapeNotVerified */ echo $block->getMediaCallback() ?>",
                "onlyMainImg": <?php /* @escapeNotVerified */ echo $block->getVar('change_only_base_image',
                    'Magento_Swatches') ?: 'false'; ?>
            }
        }
    }
</script>
