<?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\PatientInfo\Api\Data\PatientInfoOptionInterface" type="DJOGlobal\PatientInfo\Model\PatientInfoOption"/>

    <type name="Magento\Catalog\Block\Product\View">
        <plugin name="DJOGlobal_PatientInfo::ReturnTrueForHasOptionsCheck" type="DJOGlobal\PatientInfo\Plugin\ReturnTrueForHasOptionsCheck"/>
    </type>

    <type name="Magento\Catalog\Model\Product\Type\AbstractType">
        <plugin name="DJOGlobal_PatientInfo::CleanPatientInfoBuyRequest" type="DJOGlobal\PatientInfo\Plugin\CleanPatientInfoBuyRequest"/>
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoAsProductCustomOptions" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoAsProductCustomOptions"/>
    </type>

    <type name="Magento\Catalog\Model\Product">
        <plugin name="DJOGlobal_PatientInfo::ProductTypeProcessBuyRequest" type="DJOGlobal\PatientInfo\Plugin\ProductTypeProcessBuyRequest"/>
    </type>

    <type name="Magento\Catalog\Helper\Product\Configuration">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoCustomOptionsToItemRenderer" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoCustomOptionsToItemRenderer"/>
    </type>

    <type name="\Magento\Quote\Model\Quote\Item\Repository">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoOptionCartItemExtensionAttributes.php" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoOptionCartItemExtensionAttributes"/>
    </type>

    <type name="\Magento\Checkout\Model\Cart">
        <plugin name="DJOGlobal_PatientInfo::UpdatePatientInfoFromCartUpdate" type="DJOGlobal\PatientInfo\Plugin\UpdatePatientInfoFromCartUpdate"/>
    </type>

    <type name="Magento\Quote\Model\Quote\Item\ToOrderItem">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoToOrderItem" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoToOrderItem"/>
    </type>

    <type name="\Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoToOrderItemRenderer" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoToOrderItemRenderer"/>
    </type>

    <type name="\Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoToOrderItemRendererAdmin.php" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoToOrderItemRendererAdmin"/>
    </type>

    <type name="\Magento\Sales\Model\Order\ItemRepository">
        <plugin name="DJOGlobal_PatientInfo::AddPatientInfoOptionOrderItemExtensionAttributes.php" type="DJOGlobal\PatientInfo\Plugin\AddPatientInfoOptionOrderItemExtensionAttributes"/>
    </type>
</config>
