<?xml version="1.0" ?>
<!--
/**
 * MagePrince
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the mageprince.com license that is
 * available through the world-wide-web at this URL:
 * https://mageprince.com/end-user-license-agreement
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    MagePrince
 * @package     Mageprince_Faq
 * @copyright   Copyright (c) MagePrince (https://mageprince.com/)
 * @license     https://mageprince.com/end-user-license-agreement
 */
 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Mageprince\Faq\Api\FaqRepositoryInterface" type="Mageprince\Faq\Model\FaqRepository"/>
    <preference for="Mageprince\Faq\Api\Data\FaqInterface" type="Mageprince\Faq\Model\Faq"/>
    <preference for="Mageprince\Faq\Api\Data\FaqSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
	<preference for="Mageprince\Faq\Api\FaqGroupRepositoryInterface" type="Mageprince\Faq\Model\FaqGroupRepository"/>
	<preference for="Mageprince\Faq\Api\Data\FaqGroupInterface" type="Mageprince\Faq\Model\FaqGroup"/>
	<preference for="Mageprince\Faq\Api\Data\FaqGroupSearchResultsInterface" type="Magento\Framework\Api\SearchResults"/>
	<virtualType name="Mageprince\Faq\Model\ResourceModel\FaqGroup\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
		<arguments>
			<argument name="mainTable" xsi:type="string">prince_faqgroup</argument>
			<argument name="resourceModel" xsi:type="string">Mageprince\Faq\Model\ResourceModel\FaqGroup\Collection</argument>
		</arguments>
	</virtualType>
	<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
		<arguments>
			<argument name="collections" xsi:type="array">
				<item name="mageprince_faqgroup_grid_data_source" xsi:type="string">Mageprince\Faq\Model\ResourceModel\FaqGroup\Grid\Collection</item>
				<item name="mageprince_faq_grid_data_source" xsi:type="string">Mageprince\Faq\Model\ResourceModel\Faq\Grid\Collection</item>
			</argument>
		</arguments>
	</type>
	<virtualType name="Mageprince\Faq\Model\ResourceModel\Faq\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
		<arguments>
			<argument name="mainTable" xsi:type="string">prince_faq</argument>
			<argument name="resourceModel" xsi:type="string">Mageprince\Faq\Model\ResourceModel\Faq\Collection</argument>
		</arguments>
	</virtualType>
	<type name="Mageprince\Faq\Model\ImageUploader">
		<arguments>
			<argument name="baseTmpPath" xsi:type="string">faq/tmp/icon</argument>
			<argument name="basePath" xsi:type="string">faq/icon</argument>
			<argument name="allowedExtensions" xsi:type="array">
				<item name="jpg" xsi:type="string">jpg</item>
				<item name="jpeg" xsi:type="string">jpeg</item>
				<item name="gif" xsi:type="string">gif</item>
				<item name="png" xsi:type="string">png</item>
			</argument>
		</arguments>
	</type>
</config>
