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

/* @var $block \Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\Summary */

?>
<div data-bind="scope: '<?= /* @noEscape */  $block->getComponentName() ?>'">
    <h2 class="steps-wizard-title"><?= $block->escapeHtml(
        __('Step 4: Summary')
    ); ?></h2>

    <div class="admin__data-grid-wrap admin__data-grid-wrap-static">
        <!-- ko if: gridNew().length -->
        <!-- ko template: {name: getGridTemplate(), data: {
            grid: gridNew,
            paging: pagingNew,
            id: getGridId(),
            title: $t('New Product Review'),
            note: $t('Here are the products you\'re about to create.')
        }} --><!-- /ko -->
        <!-- /ko -->

        <!-- ko if: gridExisting().length -->
        <!-- ko template: {name: getGridTemplate(), data: {
            paging: pagingExisting,
            grid: gridExisting,
            id: getGridId(),
            title: $t('Associated Products'),
            note: $t('You created these products for this configuration.')
        }} --><!-- /ko -->
        <!-- /ko -->

        <!-- ko if: gridDeleted().length -->
        <!-- ko template: {name: getGridTemplate(), data: {
            paging: pagingDeleted,
            grid: gridDeleted,
            id: getGridId(),
            title: $t('Disassociated Products'),
            note: $t('These products are not associated.')
        }} --><!-- /ko -->
        <!-- /ko -->
    </div>
</div>

<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "<?= /* @noEscape */  $block->getComponentName() ?>": {
                        "component": "Magento_ConfigurableProduct/js/variations/steps/summary",
                        "appendTo": "<?= /* @noEscape */  $block->getParentComponentName() ?>",
                        "variationsComponent": "<?= /* @noEscape */ $block->getData('config/form')
                        ?>.configurableVariations",
                        "modalComponent": "<?= /* @noEscape */ $block->getData('config/form')
                        ?>.configurableModal",
                        "matrixGridComponent": "<?= /* @noEscape */ $block->getData('config/form')
                        ?>.configurable.configurable-matrix"
                    }
                }
            }
        }
    }
</script>
