<?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="LivePrawn\CondoGroupBuy\Api\CondoGroupRepositoryInterface"
                type="LivePrawn\CondoGroupBuy\Model\CondoGroupRepository"/>
    <preference for="LivePrawn\CondoGroupBuy\Api\Data\CondoGroupInterface"
                type="LivePrawn\CondoGroupBuy\Model\CondoGroup"/>
    <type name="LivePrawn\CondoGroupBuy\Model\ResourceModel\CondoGroup\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">liveprawn_condo_group</argument>
            <argument name="resourceModel" xsi:type="string">LivePrawn\CondoGroupBuy\Model\ResourceModel\CondoGroup</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="liveprawn_condo_group_listing_data_source" xsi:type="string">LivePrawn\CondoGroupBuy\Model\ResourceModel\CondoGroup\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
    <type name="Magento\Checkout\Model\Cart">
        <plugin name="liveprawn_condo_clear_after_truncate"
                type="LivePrawn\CondoGroupBuy\Plugin\Checkout\ClearCondoContextAfterTruncate"/>
    </type>
    <type name="Magento\Checkout\Model\DefaultConfigProvider">
        <plugin name="liveprawn_condo_shipping_config"
                type="LivePrawn\CondoGroupBuy\Plugin\Checkout\CondoShippingConfigProvider"
                sortOrder="20"/>
    </type>
    <type name="Magento\OfflineShipping\Model\Carrier\Flatrate">
        <plugin name="liveprawn_condo_disable_flatrate_for_condo_quote"
                type="LivePrawn\CondoGroupBuy\Plugin\Shipping\DisableFlatrateForCondoQuote"
                sortOrder="10"/>
    </type>
    <type name="Magento\Shipping\Model\Shipping">
        <plugin name="liveprawn_condo_filter_carrier_collection"
                type="LivePrawn\CondoGroupBuy\Plugin\Shipping\FilterCarrierCollection"
                sortOrder="10"/>
    </type>
    <type name="Magento\Quote\Model\Quote\Address">
        <plugin name="liveprawn_condo_select_shipping_method"
                type="LivePrawn\CondoGroupBuy\Plugin\Shipping\SelectCondoShippingMethod"
                sortOrder="20"/>
    </type>
</config>
