<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2019 Kaliop Digital Commerce (https://digitalcommerce.kaliop.com) All Rights Reserved.
  ~ https://opensource.org/licenses/OSL-3.0  Open Software License (OSL 3.0)
  ~ soon_storelocator
  ~ Christophe <dt@kaliop.com>
  -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\App\RouterList">
        <arguments>
            <argument name="routerList" xsi:type="array">
                <item name="soon_storelocator_router" xsi:type="array">
                    <item name="class" xsi:type="string">Soon\StoreLocator\Controller\Router</item>
                    <item name="disable" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="string">40</item>
                </item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Customer\CustomerData\SectionPoolInterface">
        <arguments>
            <argument name="sectionSourceMap" xsi:type="array">
                <item name="favoritestore" xsi:type="string">Soon\StoreLocator\CustomerData\FavoriteStore</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Framework\View\Page\Config">
        <plugin name="storelocator_update_canonical_for_store"
                type="Soon\StoreLocator\Plugin\UpdateCanonicalForStore"
                sortOrder="100"/>
    </type>
</config>
