<?xml version="1.0" encoding="UTF-8" ?>
<!--
/**
 * 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_CustomPricingGraphQl
 * @author     Extension Team
 * @copyright  Copyright (c) 2021 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">
    <type name="Bss\CustomPricingGraphQl\Model\ApplyCustomPriceForCart">
        <arguments>
            <argument name="applierPool" xsi:type="array">
                <item name="simple" xsi:type="object">Bss\CustomPricingGraphQl\Model\CustomPrice\Applier\Simple</item>
                <item name="configurable" xsi:type="object">Bss\CustomPricingGraphQl\Model\CustomPrice\Applier\Configurable</item>
                <item name="bundle" xsi:type="object">Bss\CustomPricingGraphQl\Model\CustomPrice\Applier\Bundle</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\QuoteGraphQl\Model\Resolver\AddProductsToCart">
       <plugin name="apply_custom_price"
               type="Bss\CustomPricingGraphQl\Plugin\ApplyCustomPricePlugin"
               sortOrder="30" />
   </type>

    <type name="Magento\QuoteGraphQl\Model\Resolver\AddSimpleProductsToCart">
        <plugin name="apply_custom_pricing"
                type="Bss\CustomPricingGraphQl\Plugin\ApplyCustomPricePlugin"
                sortOrder="30" />
    </type>

    <type name="Magento\ConfigurableProductGraphQl\Model\Resolver\AddConfigurableProductsToCart">
        <plugin name="apply_custom_pricing"
                type="Bss\CustomPricingGraphQl\Plugin\ApplyCustomPricePlugin"
                sortOrder="30" />
    </type>
</config>
