<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="before.body.end">
            <block class="Magento\Catalog\Block\FrontendStorageManager" name="frontend-storage-manager" before="-"
                   template="Magento_Catalog::frontend_storage_manager.phtml">
                <arguments>
                    <argument name="configuration" xsi:type="array">
                        <item name="recently_viewed_product" xsi:type="array">
                            <item name="requestConfig" xsi:type="array">
                                <item name="syncUrl" xsi:type="url" path="catalog/product/frontend_action_synchronize"/>
                            </item>
                        </item>
                        <item name="recently_compared_product" xsi:type="array">
                            <item name="requestConfig" xsi:type="array">
                                <item name="syncUrl" xsi:type="url" path="catalog/product/frontend_action_synchronize"/>
                            </item>
                        </item>
                        <item name="product_data_storage" xsi:type="array">
                            <item name="updateRequestConfig" xsi:type="array">
                                <item name="url" xsi:type="serviceUrl" path="/products-render-info"/>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceBlock name="top.links">
            <block class="Magento\Framework\View\Element\Template" name="catalog.compare.link" before="-"
                   template="Magento_Catalog::product/compare/link.phtml">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="compareProducts" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_Catalog/js/view/compare-products</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceBlock>
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Framework\View\Element\Template" name="catalog.compare.sidebar"
                   template="Magento_Catalog::product/compare/sidebar.phtml">
                <arguments>
                    <argument name="jsLayout" xsi:type="array">
                        <item name="components" xsi:type="array">
                            <item name="compareProducts" xsi:type="array">
                                <item name="component" xsi:type="string">Magento_Catalog/js/view/compare-products</item>
                            </item>
                        </item>
                    </argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="after.body.start">
            <block class="Magento\Framework\View\Element\Js\Components" name="head.components" as="components" template="Magento_Catalog::js/components.phtml"/>
        </referenceContainer>
        <block class="Magento\Framework\View\Element\Template" name="head.additional" as="head.additional" template="Magento_Theme::html/container.phtml"/>
    </body>
</page>
