<?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="DJOGlobal\ErpShipmentSync\Api\Data\ErpShipmentInterface" type="DJOGlobal\ErpShipmentSync\Model\ErpShipment"/>
    <preference for="DJOGlobal\ErpShipmentSync\Api\Data\ErpShipmentSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
    <preference for="DJOGlobal\ErpShipmentSync\Api\ErpShipmentRepositoryInterface" type="DJOGlobal\ErpShipmentSync\Model\ErpShipmentRepository"/>

    <type name="Magento\Sales\Api\ShipmentRepositoryInterface">
        <plugin name="DJOGlobal_ErpShipmentSync:AddErpShipmentExtensionAttributes" type="DJOGlobal\ErpShipmentSync\Plugin\AddErpShipmentExtensionAttributes"/>
        <plugin name="DJOGlobal_ErpShipmentSync:SaveErpShipmentRowAfterShipmentSave" type="DJOGlobal\ErpShipmentSync\Plugin\SaveErpShipmentRowAfterShipmentSave"/>
    </type>

    <type name="DJOGlobal\ErpShipmentSync\Logger\Handler">
        <arguments>
            <argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
        </arguments>
    </type>
    <type name="DJOGlobal\ErpShipmentSync\Logger\Logger">
        <arguments>
            <argument name="name" xsi:type="string">erp_shipment_sync</argument>
            <argument name="handlers"  xsi:type="array">
                <item name="system" xsi:type="object">DJOGlobal\ErpShipmentSync\Logger\Handler</item>
            </argument>
        </arguments>
    </type>
</config>
