<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Yeboyebo\CarritoPromociones\Api\PromoPriceStorageInterface" type="Yeboyebo\CarritoPromociones\Model\PromoPriceStorageManagement" />
    <preference for="Yeboyebo\CarritoPromociones\Api\Data\PromoPriceInterface" type="Yeboyebo\CarritoPromociones\Model\PromoPrice" />

    <preference for="Magento\Checkout\Block\Cart\Grid" type="Yeboyebo\CarritoPromociones\Block\Cart\Grid" />

    <type name="Magento\Checkout\CustomerData\Cart">
        <plugin name="Yeboyebo_CarritoPromociones::CustomerData_Cart" type="Yeboyebo\CarritoPromociones\Plugin\Model\CustomerData\Cart" sortOrder="2"/>
    </type>

    <type name="Magento\Checkout\CustomerData\AbstractItem">
        <plugin name="Yeboyebo_CarritoPromociones::CustomerData_Item" type="Yeboyebo\CarritoPromociones\Plugin\Model\CustomerData\Item"/>
    </type>

    <!-- Añadir attributos items en checkout cart grid -->
    <type name="Magento\Checkout\Block\Cart\Grid">
        <plugin name="Yeboyebo_CarritoPromociones::CartGrid_Items" type="Yeboyebo\CarritoPromociones\Plugin\Block\Cart\Grid" sortOrder="1"/>
    </type>
</config>
