<?php
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Jet Theme Backend for Magento 2 (System)
 */
/**
 * @var $block Amasty\JetTheme\Block\Adminhtml\System\Config\Field\StyleSwitcher
 * @var $escaper Magento\Framework\Escaper
 */
?>

<div id="config-switcher-button"
     class="amtheme-admin-get-config-button"
     data-bind="scope:'global_switcher'">
    <!-- ko template: getTemplate() --><!-- /ko -->
</div>

<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "global_switcher": {
                         "component": "Amasty_JetTheme/js/view/global-switcher-button",
                         "config": {
                            "urlToLoad": "<?= $escaper->escapeJs($block->getPresetDataUrl()); ?>"
                         }
                    }
                }
            }
        }
    }
</script>
