<?xml version="1.0"?>
<!--
/**
* BSS Commerce Co.
*
* NOTICE OF LICENSE
*
* This source file is subject to the EULA
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://bsscommerce.com/Bss-Commerce-License.txt
*
* @category   BSS
* @package    Bss_ConfiguableGridView
* @author     Extension Team
* @copyright  Copyright (c) 2018-2019 BSS Commerce Co. ( http://bsscommerce.com )
* @license    http://bsscommerce.com/Bss-Commerce-License.txt
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
	<preference for="Magento\Swatches\Block\Product\Renderer\Configurable" type="Bss\ConfiguableGridView\Block\Product\View\Configurable" />
	<preference for="Magento\Checkout\Controller\Cart\UpdateItemOptions" type="Bss\ConfiguableGridView\Controller\Cart\UpdateItemOptions" />
	<type name="Magento\ConfigurableProduct\Model\Product\Type\Configurable">
		<plugin name="matrix-add-child-qty" type="Bss\ConfiguableGridView\Model\ResourceModel\Product\Type\Configurable" sortOrder="10"/>
	</type>
	<type name="Magento\Wishlist\Model\Wishlist">
		<plugin name="matrix-update-wishlist" type="Bss\ConfiguableGridView\Plugin\Model\Wishlist" sortOrder="10"/>
	</type>

    <type name="Bss\ConfiguableGridView\Model\ConfigurableProduct\Model\Plugin\Frontend\UsedProductsCache">
        <arguments>
            <argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Collection</argument>
        </arguments>
        <arguments>
            <argument name="serializer" xsi:type="object">Magento\Framework\Serialize\Serializer\Json</argument>
        </arguments>
    </type>

    <type name="Bss\ConfiguableGridView\Model\MultiInventorySource\MsiObjectManagement">
        <arguments>
            <argument name="getStockItemDataInterface" xsi:type="string">\Magento\InventorySalesApi\Model\GetStockItemDataInterface</argument>
        </arguments>
    </type>
</config>
