<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <type name="Magento\Checkout\Block\Checkout\AttributeMerger">
    <plugin name="shippingAddress" type="Yeboyebo\CheckoutAddress\Plugin\Checkout\Block\Checkout\AttributeMerger\Plugin"/>
  </type>
  <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
      <plugin name="checkout_address_fields" type="Yeboyebo\CheckoutAddress\Plugin\Checkout\LayoutProcessorPlugin" sortOrder="10"/>
  </type>
  <preference for="Magento\Checkout\Model\ShippingInformationManagement" type="Yeboyebo\CheckoutAddress\Model\ShippingInformationManagement" />

  <!-- Grid Yeboyebo > Comunas Chile > Gestionar comunas Chile -->
  <virtualType name="Yeboyebo\CheckoutAddress\Model\ResourceModel\CoverageArea\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>
      <argument name="mainTable" xsi:type="string">yeboyebo_chilexpress_coverage_area</argument>
      <argument name="resourceModel" xsi:type="string">Yeboyebo\CheckoutAddress\Model\ResourceModel\CoverageArea</argument>
    </arguments>
  </virtualType>
  <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
      <argument name="collections" xsi:type="array">
        <item name="ybcomunas_comuna_listing_data_source" xsi:type="string">Yeboyebo\CheckoutAddress\Model\ResourceModel\CoverageArea\Grid\Collection</item>
      </argument>
    </arguments>
  </type>
</config>
