<?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="Yeboyebo\MenuOrganizer\Api\Data\MenuInterface" type="Yeboyebo\MenuOrganizer\Model\Menu"/>

    <virtualType name="Yeboyebo\MenuOrganizer\Model\ResourceModel\Menu\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">scandiweb_menumanager_menu</argument>
            <argument name="resourceModel" xsi:type="string">Yeboyebo\MenuOrganizer\Model\ResourceModel\Menu</argument>
        </arguments>
    </virtualType>

    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="yeboyebo_menuorganizer_menus_data_source" xsi:type="string">Yeboyebo\MenuOrganizer\Model\ResourceModel\Menu\Grid\Collection</item>
            </argument>
        </arguments>
    </type>
</config>
