<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Gift Wrap for Magento 2
 */--><!--
/**
* Copyright © 2019 Amasty. All rights reserved.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Amasty\GiftWrap\Model\Wrapper\ResourceModel\Grid\Collection">
        <arguments>
            <argument name="eventPrefix" xsi:type="string">amgiftwrap_wrap_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">amgiftwrap_wrap_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Amasty\GiftWrap\Model\Wrapper\ResourceModel\Wrap</argument>
        </arguments>
    </type>

    <virtualType name="Amasty\GiftWrap\Model\Ui\DataProvider\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="use_default" xsi:type="array">
                    <item name="class" xsi:type="string">Amasty\GiftWrap\Model\Ui\DataProvider\Modifier\UseDefault</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                </item>
            </argument>
        </arguments>
    </virtualType>

    <type name="Amasty\GiftWrap\Model\Wrapper\DataProvider\FormDataProvider">
        <arguments>
            <argument name="pool" xsi:type="object">Amasty\GiftWrap\Model\Ui\DataProvider\Modifier\Pool</argument>
        </arguments>
    </type>

    <type name="Amasty\GiftWrap\Model\MessageCard\ResourceModel\Grid\Collection">
        <arguments>
            <argument name="eventPrefix" xsi:type="string">amgiftwrap_message_card_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">amgiftwrap_message_card_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Amasty\GiftWrap\Model\MessageCard\ResourceModel\Wrap</argument>
        </arguments>
    </type>

    <type name="Amasty\GiftWrap\Model\MessageCard\DataProvider\FormDataProvider">
        <arguments>
            <argument name="pool" xsi:type="object">Amasty\GiftWrap\Model\Ui\DataProvider\Modifier\Pool</argument>
        </arguments>
    </type>

    <type name="Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>
    <type name="Magento\Sales\Block\Adminhtml\Order\Creditmemo\Create\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>
    <type name="Magento\Sales\Block\Adminhtml\Order\Invoice\View\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>
    <type name="Magento\Sales\Block\Adminhtml\Order\Creditmemo\View\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>
    <type name="Magento\Shipping\Block\Adminhtml\View\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>
    <type name="Magento\Shipping\Block\Adminhtml\Create\Items">
        <plugin name="Amasty_GiftWrap::DisplayWrapItems"
                type="Amasty\GiftWrap\Plugin\Sales\Block\Adminhtml\Order\ItemsPlugin" />
    </type>

</config>
