<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Model\ShippingInformationManagement">
        <plugin name="drc_save_delivery_date_in_quote" type="Drc\Storepickup\Plugin\Checkout\Model\ShippingInformationManagement" sortOrder="1"/>
    </type>
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="delivery_date" xsi:type="string">sales_order.delivery_date</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="DrcStorepickupGirdFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool">
        <arguments>
            <argument name="appliers" xsi:type="array">
                <item name="regular" xsi:type="object">Magento\Framework\View\Element\UiComponent\DataProvider\RegularFilter</item>
                <item name="fulltext" xsi:type="object">Magento\Framework\View\Element\UiComponent\DataProvider\FulltextFilter</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="DrcStorepickupStorelocatorGridDataProvider" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">Drc\Storepickup\Model\ResourceModel\Storelocator\Collection</argument>
            <argument name="filterPool" xsi:type="object" shared="false">DrcStorepickupGirdFilterPool</argument>
        </arguments>
    </virtualType>
    <type name="Drc\Storepickup\Model\ResourceModel\Storelocator\Grid\Collection">
        <arguments>
            <argument name="mainTable" xsi:type="string">drc_storepickup_storelocator</argument>
            <argument name="eventPrefix" xsi:type="string">drc_storepickup_storelocator_grid_collection</argument>
            <argument name="eventObject" xsi:type="string">storelocator_grid_collection</argument>
            <argument name="resourceModel" xsi:type="string">Drc\Storepickup\Model\ResourceModel\Storelocator</argument>
        </arguments>
    </type>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="drc_storepickup_storelocator_listing_data_source" xsi:type="string">Drc\Storepickup\Model\ResourceModel\Storelocator\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
</config>