<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="FiloBlu\Refilo\Model\Redirects\Interfaces\RedirectsRepositoryInterface" type="FiloBlu\Refilo\Model\Redirects\Repository\RedirectsRepository"/>
    <preference for="FiloBlu\Refilo\Model\Redirects\Interfaces\RedirectInterface" type="\FiloBlu\Refilo\Model\Redirects\Redirects"/>
    <preference for="FiloBlu\Refilo\Api\MergeCartsInterface" type="FiloBlu\Refilo\Model\MergeCart"/>
    <preference for="FiloBlu\Refilo\Api\CustomerAdditionalManagementInterface" type="FiloBlu\Refilo\Model\CustomerAdditionalManagement"/>
    <preference for="FiloBlu\Refilo\Remote\DeletedItemFinderInterface" type="FiloBlu\Refilo\Remote\EmptyDeletedItemFinder"/>
    <preference for="FiloBlu\Refilo\Remote\Connector\ConnectorConfigurationRepositoryInterface" type="FiloBlu\Refilo\Remote\Connector\ConnectorConfigurationRepository"/>
    <preference for="FiloBlu\Refilo\Remote\IndexerConfiguration\IndexerConfigurationInterface" type="FiloBlu\Refilo\Remote\IndexerConfiguration\IndexerConfiguration"/>
    <preference for="FiloBlu\Refilo\Remote\Connector\ConnectorConfigurationInterface" type="FiloBlu\Refilo\Remote\Connector\ConnectorConfiguration"/>
    <preference for="FiloBlu\Refilo\Remote\IndexerConfiguration\IndexerConfigurationRepositoryInterface" type="FiloBlu\Refilo\Remote\IndexerConfiguration\IndexerConfigurationRepository"/>
    <preference for="FiloBlu\Refilo\Api\NewsletterManagementInterface" type="FiloBlu\Refilo\Model\NewsletterManagement"/>
    <preference for="FiloBlu\Refilo\Api\CustomerGroupManagmentInterface" type="FiloBlu\Refilo\Model\CustomerGroupManagment"/>
    <preference for="Magento\GroupedProduct\Model\ResourceModel\Product\Link" type="FiloBlu\Refilo\Model\ResourceModel\Grouped\Link"/>
    <preference for="FiloBlu\Refilo\Api\WishlistManagementInterface" type="FiloBlu\Refilo\Model\WishlistManagement"/>
    <preference for="FiloBlu\Refilo\Model\ShippingEstimationResolverInterface" type="FiloBlu\Refilo\Model\ShippingEstimationResolver"/>
    <preference for="Magento\Framework\Pricing\PriceCurrencyInterface" type="FiloBlu\Refilo\Model\PriceCurrency"/>
    <preference for="FiloBlu\Refilo\Api\SearchManagementInterface" type="FiloBlu\Refilo\Model\SearchManagement"/>
    <preference for="FiloBlu\Refilo\Model\StockIdResolverInterface" type="FiloBlu\Refilo\Model\DefaultStockIdResolver"/>
    <preference for="FiloBlu\Refilo\Api\CartManagementInterface" type="FiloBlu\Refilo\Model\CartManagement"/>
    <preference for="FiloBlu\Refilo\Api\Data\ProductCustomOptionInterface" type="FiloBlu\Refilo\Model\ProductCustomOption"/>
    <preference for="FiloBlu\Refilo\Api\Data\ProductCustomOptionValueInterface" type="FiloBlu\Refilo\Model\ProductCustomOptionValue"/>
    <preference for="FiloBlu\Refilo\Model\Indexer\Locator\SnapshotMViewStateTableInterface" type="FiloBlu\Refilo\Model\Indexer\Locator\SnapshotMViewStateTable"/>

    <type name="FiloBlu\Refilo\Remote\RunOnceDeleteItemFinder" shared="true"/>

    <type name="FiloBlu\Refilo\Remote\Entity\MagentoToRefiloProductAdapter">
        <arguments>
            <argument name="productHelper" xsi:type="object" shared="false">FiloBlu\Refilo\Helper\Catalog\ProductHelper</argument>
        </arguments>
    </type>

    <type name="Magento\Customer\Api\CustomerRepositoryInterface">
        <plugin name="filoblu_mod2_refilo_update_customer_subscriber_info" type="FiloBlu\Refilo\Plugins\Api\CustomerRepositoryInterface"/>
    </type>

    <!-- Fix RR-499 -->
    <type name="Magento\GroupedProduct\Model\Product\Type\Grouped">
        <plugin name="filoblu_mod2_refilo_model_product_type_grouped" type="FiloBlu\Refilo\Plugins\Model\Product\Type\Grouped"/>
    </type>

    <type name="FiloBlu\Refilo\Model\Exporter\Urls">
        <arguments>
            <argument name="urlProviders" xsi:type="array">
                <item name="cms-homepage" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\HomePageUrlProvider</item>
                <item name="cms" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\PageUrlProvider</item>
                <item name="category" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\CategoryUrlProvider</item>
                <item name="products" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\ProductUrlProvider</item>
                <item name="masterdata" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\MasterdataUrlProvider</item>
                <item name="disabled_products" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductUrlProvider</item>
            </argument>
        </arguments>
    </type>

    <type name="Aheadworks\Followupemail2\Model\Template\Filter">
        <plugin name="FiloBlu_Refilo_followupemail2_image_template" type="FiloBlu\Refilo\Plugins\Followupemail2\FilterTemplate" sortOrder="1" disabled="false"/>
    </type>

    <type name="Magento\Cms\Controller\Adminhtml\Page\Save">
        <arguments>
            <argument name="dataProcessor" xsi:type="object">FiloBlu\Refilo\Model\CmsPage\PostDataProcessor</argument>
        </arguments>
    </type>

    <type name="Magento\Cms\Model\Page\DataProvider">
        <plugin name="Filoblu_Refilo_PageDataProvider" type="FiloBlu\Refilo\Plugins\PageDataProvider" sortOrder="1"/>
    </type>

    <type name="Magento\Cms\Controller\Adminhtml\Block\Save">
        <plugin name="Filoblu_Refilo_CmsBlockPostValue" type="FiloBlu\Refilo\Plugins\CmsBlockPostValue" sortOrder="1"/>
    </type>

    <type name="Magento\Cms\Model\Block\DataProvider">
        <plugin name="Filoblu_Refilo_BlockDataProvider" type="FiloBlu\Refilo\Plugins\BlockDataProvider" sortOrder="1"/>
    </type>

    <type name="FiloBlu\Refilo\Helper\Catalog\ProductAttributeHelper" shared="true">
        <arguments>
            <argument name="mandatoryAttributes" xsi:type="array">
                <item name="sku" xsi:type="string">sku</item>
                <item name="name" xsi:type="string">name</item>
                <item name="url_key" xsi:type="string">url_key</item>
                <item name="description" xsi:type="string">description</item>
                <item name="giftcard_type" xsi:type="string">giftcard_type</item>
                <item name="allow_message" xsi:type="string">allow_message</item>
            </argument>
            <argument name="excludedAttributes" xsi:type="array">
                <item name="created_at" xsi:type="string">created_at</item>,
                <item name="custom_design" xsi:type="string">custom_design</item>,
                <item name="custom_design_from" xsi:type="string">custom_design_from</item>,
                <item name="custom_design_to" xsi:type="string">custom_design_to</item>,
                <item name="custom_layout" xsi:type="string">custom_layout</item>,
                <item name="custom_layout_update" xsi:type="string">custom_layout_update</item>,
                <item name="custom_layout_update_file" xsi:type="string">custom_layout_update_file</item>,
                <item name="email_template" xsi:type="string">email_template</item>,
                <item name="has_options" xsi:type="string">has_options</item>,
                <item name="media_gallery" xsi:type="string">media_gallery</item>,
                <item name="minimal_price" xsi:type="string">minimal_price</item>,
                <item name="price" xsi:type="string">price</item>,
                <item name="msrp_display_actual_price_type" xsi:type="string">msrp_display_actual_price_type</item>,
                <item name="old_id" xsi:type="string">old_id</item>,
                <item name="image" xsi:type="string">image</item>,
                <item name="image_label" xsi:type="string">image_label</item>,
                <item name="links_exist" xsi:type="string">links_exist</item>,
                <item name="links_purchased_separately" xsi:type="string">links_purchased_separately</item>,
                <item name="links_title" xsi:type="string">links_title</item>,
                <item name="merchant_center_category" xsi:type="string">merchant_center_category</item>,
                <item name="msrp" xsi:type="string">msrp</item>,
                <item name="options_container" xsi:type="string">options_container</item>,
                <item name="origin_storage" xsi:type="string">origin_storage</item>,
                <item name="package_mode" xsi:type="string">package_mode</item>,
                <item name="package_type" xsi:type="string">package_type</item>,
                <item name="page_layout" xsi:type="string">page_layout</item>,
                <item name="price_type" xsi:type="string">price_type</item>,
                <item name="price_view" xsi:type="string">price_view</item>,
                <item name="quantity_and_stock_status" xsi:type="string">quantity_and_stock_status</item>,
                <item name="related_tgtr_position_behavior" xsi:type="string">related_tgtr_position_behavior</item>,
                <item name="related_tgtr_position_limit" xsi:type="string">related_tgtr_position_limit</item>,
                <item name="required_options" xsi:type="string">required_options</item>,
                <item name="small_image" xsi:type="string">small_image</item>,
                <item name="small_image_label" xsi:type="string">small_image_label</item>,
                <item name="special_price" xsi:type="string">special_price</item>,
                <item name="status" xsi:type="string">status</item>,
                <item name="swatch_image" xsi:type="string">swatch_image</item>,
                <item name="thumbnail" xsi:type="string">thumbnail</item>,
                <item name="thumbnail_label" xsi:type="string">thumbnail_label</item>,
                <item name="tier_price" xsi:type="string">tier_price</item>,
                <item name="type_of_product" xsi:type="string">type_of_product</item>,
                <item name="updated_at" xsi:type="string">updated_at</item>,
                <item name="upsell_tgtr_position_behavior" xsi:type="string">upsell_tgtr_position_behavior</item>,
                <item name="upsell_tgtr_position_limit" xsi:type="string">upsell_tgtr_position_limit</item>,
                <item name="use_config_allow_message" xsi:type="string">use_config_allow_message</item>,
                <item name="use_config_email_template" xsi:type="string">use_config_email_template</item>,
                <item name="use_config_is_redeemable" xsi:type="string">use_config_is_redeemable</item>,
                <item name="visibility" xsi:type="string">visibility</item>,
                <item name="shipment_type" xsi:type="string">shipment_type</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\Connector\ConnectorPool">
        <arguments>
            <argument name="connectors" xsi:type="array">
                <item name="mongodb" xsi:type="string">FiloBlu\Refilo\Remote\Connector\MongoDb</item>
                <item name="elasticsearch" xsi:type="string">FiloBlu\Refilo\Remote\Connector\ElasticSearch</item>
                <item name="null" xsi:type="string">FiloBlu\Refilo\Remote\Connector\NullConnector</item>
                <item name="file" xsi:type="string">FiloBlu\Refilo\Remote\Connector\FileConnector</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Console\Command\ImportSynonyms">
        <arguments>
            <argument name="exporter" xsi:type="object">FiloBlu\Refilo\Model\Exporter\Synonyms</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Model\Importer\Wishlist">
        <arguments>
            <argument name="wishlistManagement" xsi:type="object">FiloBlu\Refilo\Model\WishlistManagement\Proxy</argument>
            <argument name="configurable" xsi:type="object">Magento\ConfigurableProduct\Model\Product\Type\Configurable\Proxy</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Console\Command\ImportWishlist">
        <arguments>
            <argument name="exporter" xsi:type="object">FiloBlu\Refilo\Model\Importer\Wishlist\Proxy</argument>
        </arguments>
    </type>

    <type name="Magento\Framework\Console\CommandListInterface">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="command_sync_blocks" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportBlocks</item>
                <item name="command_sync_pages" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportPages</item>
                <item name="command_sync_countries" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportCountries</item>
                <item name="command_sync_storelocator" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportStores</item>
                <item name="command_sync_config" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportConfig</item>
                <item name="command_sync_menu" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportMenu</item>
                <item name="command_sync_url" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportUrls</item>
                <item name="command_sync_translations" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportTranslations</item>
                <item name="command_sync_redirects" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportRedirects</item>
                <item name="command_rating_indexer" xsi:type="object">FiloBlu\Refilo\Console\Command\RatingIndexer</item>
                <item name="command_sync_all" xsi:type="object">FiloBlu\Refilo\Console\Command\SyncAllCommand</item>
                <item name="command_sync_masterdata" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportMasterData</item>
                <item name="command_translation_sync" xsi:type="object">FiloBlu\Refilo\Console\Command\SyncTranslationCommand</item>
                <item name="command_sync_wishlist" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportWishlist</item>
                <item name="command_sync_synonyms" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportSynonyms</item>
                <item name="command_sync_search_terms" xsi:type="object">FiloBlu\Refilo\Console\Command\ExportTermsCommand</item>
                <item name="command_refilo_run_indexer" xsi:type="object">FiloBlu\Refilo\Console\Command\RunIndexer</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Console\Command\SyncAllCommand">
        <arguments>
            <argument name="commandList" xsi:type="array">
                <item name="command_sync_config" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportConfig</item>
                <item name="command_sync_countries" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportCountries</item>
                <item name="command_sync_url" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportUrls</item>
                <item name="command_sync_redirects" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportRedirects</item>
                <item name="command_sync_blocks" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportBlocks</item>
                <item name="command_sync_pages" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportPages</item>
                <item name="command_sync_menu" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportMenu</item>
                <item name="command_sync_translations" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportTranslations</item>
                <item name="command_rating_indexer" xsi:type="object">FiloBlu\Refilo\Console\Command\RatingIndexer</item>
                <item name="command_sync_masterdata" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportMasterData</item>
                <item name="command_sync_storelocator" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportStores</item>
                <item name="command_sync_synonyms" xsi:type="object">FiloBlu\Refilo\Console\Command\ImportSynonyms</item>
                <item name="command_sync_search_terms" xsi:type="object">FiloBlu\Refilo\Console\Command\ExportTermsCommand</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="filoblu_redirects_listing_data_source" xsi:type="string">FiloBlu\Refilo\Model\Redirects\ResourceModel\Grid\Collection</item>
            </argument>
        </arguments>
    </type>

    <!-- To define new index not managed by magento -->
    <type name="FiloBlu\Refilo\Remote\IndexerConfiguration\IndexerPool">
        <arguments>
            <argument name="indexers" xsi:type="array">
                <item name="beehive_rating" xsi:type="string">FiloBlu\Refilo\Remote\RatingIndexer</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\Connector\ConnectorConfigurationRepository">
        <arguments>
            <argument name="serializer" xsi:type="object">Magento\Framework\Serialize\Serializer\Json</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\ProductIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\ProductProviderFactory</argument>
            <argument name="deletedItemFinder" xsi:type="object">FiloBlu\Refilo\Remote\DeletedProductsItemFinder</argument>
        </arguments>
    </type>

    <virtualType name="FiloBlu\Refilo\Remote\RunOnceDeletedUrlItemFinder" type="FiloBlu\Refilo\Remote\RunOnceDeleteItemFinder" >
        <arguments>
            <argument name="deletedItemFinder" xsi:type="object">FiloBlu\Refilo\Remote\DeletedUrlItemFinder</argument>
        </arguments>
    </virtualType>

    <type name="FiloBlu\Refilo\Remote\UrlsIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\UrlProviderFactory</argument>
            <argument name="deletedItemFinder" xsi:type="object">FiloBlu\Refilo\Remote\RunOnceDeletedUrlItemFinder</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\DisabledProductIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\CategoriesProductIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\CategoriesProductProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\PriceIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\PriceProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\StockIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\StockProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\CategoryIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\CategoryProviderFactory</argument>
            <argument name="deletedItemFinder" xsi:type="object">FiloBlu\Refilo\Remote\DeletedCategoriesItemFinder</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\AttributeIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\ProductAttributeProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\RatingIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\RatingProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\CategoryPermissionsIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\CategoryPermissionsProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\RelatedIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\RelatedProviderFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\ProductFilterIndexer">
        <arguments>
            <argument name="entityProviderFactory" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\VisibleProductProviderFactory</argument>
        </arguments>
    </type>
    <type name="FiloBlu\Refilo\Model\Exporter\Config">
        <arguments>
            <argument name="providers" xsi:type="array">
                <item name="store" xsi:type="object">FiloBlu\Refilo\Model\Config\StoreConfigProvider</item>
                <item name="storeFront" xsi:type="object">FiloBlu\Refilo\Model\Config\StoreFrontConfigProvider</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Helper\ContentManager\Data" shared="true"/>

    <!-- Import sample files -->
    <type name="Magento\ImportExport\Model\Import\SampleFileProvider">
        <arguments>
            <argument name="samples" xsi:type="array">
                <item name="redirects" xsi:type="string">FiloBlu_Refilo</item>
            </argument>
        </arguments>
    </type>

    <!-- ESB Integration -->
    <type name="FiloBlu\Refilo\Model\Consumer\ContactConsumer">
        <arguments>
            <argument name="objectTypeDescriptor" xsi:type="object">FiloBlu\Esb\Model\ObjectType\Descriptor\Form</argument>
        </arguments>
    </type>
    <type name="FiloBlu\Refilo\Model\Consumer\NewsletterConsumer">
        <arguments>
            <argument name="objectTypeDescriptor" xsi:type="object">FiloBlu\Esb\Model\ObjectType\Descriptor\Form</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Esb\Model\ConsumerResolver">
        <arguments>
            <argument name="consumers" xsi:type="array">
                <item name="FiloBlu_Refilo::contact_consumer" xsi:type="object">FiloBlu\Refilo\Model\Consumer\ContactConsumer</item>
                <item name="FiloBlu_Refilo::newsletter_consumer" xsi:type="object">FiloBlu\Refilo\Model\Consumer\NewsletterConsumer</item>
            </argument>
        </arguments>
    </type>

    <!-- END ESB Integration -->

    <!-- Get cheapest shipping if there's a free shipping rule -->
    <type name="Magento\Quote\Api\ShipmentEstimationInterface">
        <plugin name="filoblu_refilo_shipping_estimation" type="FiloBlu\Refilo\Plugins\Api\ShipmentEstimationInterface"/>
    </type>

    <type name="FiloBlu\Refilo\Setup\RecurringData">
        <arguments>
            <argument name="defaultRemoteIndex" xsi:type="array">
                <item name="beehive_attribute" xsi:type="string">attributes_%s</item>
                <item name="beehive_product" xsi:type="string">products_%s</item>
                <item name="beehive_product_filter" xsi:type="string">products_%s</item>
                <item name="beehive_rating" xsi:type="string">products_%s</item>
                <item name="beehive_price" xsi:type="string">products_%s</item>
                <item name="beehive_stock" xsi:type="string">products_%s</item>
                <item name="beehive_categories_product" xsi:type="string">products_%s</item>
                <item name="beehive_category_permissions" xsi:type="string">categories_%s</item>
                <item name="beehive_category" xsi:type="string">categories_%s</item>
                <item name="beehive_disabled_product" xsi:type="string">products_%s</item>
                <item name="beehive_urls" xsi:type="string">urls</item>
                <item name="beehive_related" xsi:type="string">product_related</item>
                <item name="beehive_linked_product_bridge" xsi:type="string">product_related</item>
            </argument>
        </arguments>
    </type>

    <virtualType name="FiloBlu\Refilo\Model\Redirects\ResourceModel\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">filoblu_refilo_redirect</argument>
            <argument name="resourceModel" xsi:type="string">FiloBlu\Refilo\Model\Redirects\ResourceModel\Redirects</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\ProductProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\ProductProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\UrlProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\UrlProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\CategoryProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\CategoryProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\StockProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\StockProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\PriceProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\PriceProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\ProductAttributeProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\ProductAttributeProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\CategoriesProductProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\CategoriesProductProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\RatingProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\RatingProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\CategoryPermissionsProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\CategoryPermissionsProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\RelatedProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\RelatedProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\VisibleProductProviderFactory" type="FiloBlu\Refilo\Remote\Entity\EntityProviderInterfaceFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Remote\Entity\Provider\VisibleProductProvider</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\DeletedCategoriesItemFinder" type="FiloBlu\Refilo\Remote\BasesSqlDeletedItemFinder">
        <arguments>
            <argument name="table" xsi:type="string">catalog_category_entity</argument>
            <argument name="idColumn" xsi:type="string">entity_id</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\DeletedProductsItemFinder" type="FiloBlu\Refilo\Remote\BasesSqlDeletedItemFinder">
        <arguments>
            <argument name="table" xsi:type="string">catalog_product_entity</argument>
            <argument name="idColumn" xsi:type="string">entity_id</argument>
        </arguments>
    </virtualType>

    <virtualType name="FiloBlu\Refilo\Remote\DeletedUrlItemFinder" type="FiloBlu\Refilo\Remote\BasesSqlDeletedItemFinder">
        <arguments>
            <argument name="table" xsi:type="string">url_rewrite</argument>
            <argument name="idColumn" xsi:type="string">url_rewrite_id</argument>
        </arguments>
    </virtualType>

    <virtualType name="DefaultWYSIWYGValidator" type="Magento\Framework\Validator\HTML\ConfigurableWYSIWYGValidator">
        <arguments>
            <argument name="allowedAttributes" xsi:type="array">
                <item name="class" xsi:type="string">class</item>
                <item name="width" xsi:type="string">width</item>
                <item name="height" xsi:type="string">height</item>
                <item name="style" xsi:type="string">style</item>
                <item name="alt" xsi:type="string">alt</item>
                <item name="title" xsi:type="string">title</item>
                <item name="border" xsi:type="string">border</item>
                <item name="id" xsi:type="string">id</item>
                <item name="data_min_height" xsi:type="string">data-min-height</item>
                <item name="mobile_min_height" xsi:type="string">data-mobile-min-height</item>
                <item name="data_justify_content" xsi:type="string">data-justify-content</item>
                <item name="mobile_margin" xsi:type="string">mobile-margin</item>
                <item name="mobile_padding" xsi:type="string">mobile-padding</item>
                <item name="data_background_image" xsi:type="string">data-background-image</item>
                <item name="mobile_image" xsi:type="string">mobile-image</item>
                <item name="data-content-type" xsi:type="string">data-content-type</item>
                <item name="data-appearance" xsi:type="string">data-appearance</item>
                <item name="data-mobile-margin" xsi:type="string">data-mobile-margin</item>
                <item name="data-mobile-padding" xsi:type="string">data-mobile-padding</item>
                <item name="data-background-mobile-image" xsi:type="string">data-background-mobile-image</item>
                <item name="data-custom-style" xsi:type="string">data-custom-style</item>
                <item name="data-element" xsi:type="string">data-element</item>
                <item name="data-above-fold" xsi:type="string">data-above-fold</item>
                <item name="data-rsp-speed" xsi:type="string">data-rsp-speed</item>
                <item name="data-rsp-easing" xsi:type="string">data-rsp-easing</item>
                <item name="data-rsp-root-margin" xsi:type="string">data-rsp-root-margin</item>
                <item name="data-rsp-disabled" xsi:type="string">data-rsp-disabled</item>
                <item name="data-rsp-should-always-complete-animation" xsi:type="string">data-rsp-should-always-complete-animation</item>
                <item name="data-rsp-should-disable-scaling-translations" xsi:type="string">data-rsp-should-disable-scaling-translations</item>
                <item name="data-rsp-start-scroll" xsi:type="string">data-rsp-start-scroll</item>
                <item name="data-rsp-end-scroll" xsi:type="string">data-rsp-end-scroll</item>
                <item name="data-rsp-target-element" xsi:type="string">data-rsp-target-element</item>
                <item name="data-rsp-translate-x" xsi:type="string">data-rsp-translate-x</item>
                <item name="data-rsp-translate-y" xsi:type="string">data-rsp-translate-y</item>
                <item name="data-rsp-rotate" xsi:type="string">data-rsp-rotate</item>
                <item name="data-rsp-rotate-x" xsi:type="string">data-rsp-rotate-x</item>
                <item name="data-rsp-rotate-y" xsi:type="string">data-rsp-rotate-y</item>
                <item name="data-rsp-rotate-z" xsi:type="string">data-rsp-rotate-z</item>
                <item name="data-rsp-scale" xsi:type="string">data-rsp-scale</item>
                <item name="data-rsp-scale-x" xsi:type="string">data-rsp-scale-x</item>
                <item name="data-rsp-scale-y" xsi:type="string">data-rsp-scale-y</item>
                <item name="data-rsp-scale-z" xsi:type="string">data-rsp-scale-z</item>
                <item name="data-rsp-opacity" xsi:type="string">data-rsp-opacity</item>
                <item name="data-rsp-on-progress-change" xsi:type="string">data-rsp-on-progress-change</item>
                <item name="data-rsp-on-change" xsi:type="string">data-rsp-on-change</item>
                <item name="data-rsp-on-enter" xsi:type="string">data-rsp-on-enter</item>
                <item name="data-rsp-on-exit" xsi:type="string">data-rsp-on-exit</item>
                <item name="data-mobile-video-source" xsi:type="string">data-mobile-video-source</item>
                <item name="data-video-source" xsi:type="string">data-video-source</item>
                <item name="data-background-video-path" xsi:type="string">data-background-video-path</item>
                <item name="data-background-mobile-video-path" xsi:type="string">data-background-mobile-video-path</item>
            </argument>
        </arguments>
    </virtualType>

    <type name="FiloBlu\Refilo\Remote\Entity\Provider\AbstractUrlProvider">
        <arguments>
            <argument name="disabledEntityFilter" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\Filter\EmptyDisabledEntityFilter</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductUrlProvider">
        <arguments>
            <argument name="disabledEntityFilter" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\Filter\DisabledProductsFilter</argument>
        </arguments>
    </type>

    <virtualType name="FiloBlu\Refilo\Remote\Entity\Provider\ProductUrlProvider" type="FiloBlu\Refilo\Remote\Entity\Provider\EntityUrlProvider">
        <arguments>
            <argument name="type" xsi:type="string">product</argument>
            <argument name="disabledEntityFilter" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\Filter\DisabledAndNotVisibleProductsFilter</argument>
        </arguments>
    </virtualType>

    <type name="FiloBlu\Refilo\Model\RoundingStrategyProvider">
        <arguments>
            <argument name="roundingStrategy" xsi:type="array">
                <item name="round_default" xsi:type="object">FiloBlu\Refilo\Model\DefaultRoundStrategy</item>
                <item name="round_half_up" xsi:type="object">FiloBlu\Refilo\Model\RoundHalfUpStrategy</item>
                <item name="round_half_down" xsi:type="object">FiloBlu\Refilo\Model\RoundHalfDownStrategy</item>
                <item name="round_half_even" xsi:type="object">FiloBlu\Refilo\Model\RoundHalfEvenStrategy</item>
                <item name="round_half_odd" xsi:type="object">FiloBlu\Refilo\Model\RoundHalfOddStrategy</item>
            </argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Model\PriceFilterStrategyProvider">
        <arguments>
            <argument name="priceFilterStrategy" xsi:type="array">
                <item name="automaticPriceRange" xsi:type="string">Automatic Price Range</item>
                <item name="automaticStepRange" xsi:type="string">Automatic Step Range</item>
                <item name="customSteps" xsi:type="string">Custom Steps</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\CatalogRule\Model\Indexer\ProductPriceCalculator">
        <arguments>
            <argument name="priceCurrency" xsi:type="object">FiloBlu\Refilo\Model\Calculator</argument>
        </arguments>
    </type>

    <!--    <type name="Magento\GroupedProduct\Model\ResourceModel\Product\Type\Grouped\AssociatedProductsCollection">-->
    <!--        <plugin name="filoblu_mod2_refilo_model_product_type_grouped_associated_products_collection" type="FiloBlu\Refilo\Plugins\Model\ResourceModel\Product\Type\Grouped\AssociatedProductsCollection" disabled="true"/>-->
    <!--    </type>-->

    <type name="FiloBlu\Refilo\Model\Config\StoreFrontConfigProvider">
        <arguments>
            <argument name="serializer" xsi:type="object">Magento\Framework\Serialize\Serializer\Json</argument>
        </arguments>
    </type>

    <type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
        <arguments>
            <argument name="extensions" xsi:type="array">
                <item name="allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">image/svg+xml</item>
                </item>
                <item name="image_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">image/svg+xml</item>
                </item>
                <item name="media_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">image/svg+xml</item>
                </item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Cms\Controller\Adminhtml\Wysiwyg\Images\Thumbnail">
        <plugin name="filoblu_refilo_controller_adminhtml_wysiwyg_images_thumbnail" type="FiloBlu\Refilo\Plugins\Controller\Adminhtml\Wysiwyg\Images\ThumbnailPlugin"/>
    </type>

    <type name="FiloBlu\Refilo\Model\ShippingEstimationResolver">
        <arguments>
            <argument name="configurationPath" xsi:type="string">refilo_sales/cart/shipping_estimation_strategy</argument>
            <argument name="shipmentStrategies" xsi:type="array">
                <item name="shipping_estimation_strategy_none" xsi:type="object">FiloBlu\Refilo\Model\ShippingEstimationNone</item>
                <item name="shipping_estimation_strategy_country_region" xsi:type="object">FiloBlu\Refilo\Model\ShippingEstimationCountryAndRegion</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Sitemap\Model\ResourceModel\Catalog\Product">
        <arguments>
            <argument name="urlBuilder" xsi:type="object">FiloBlu\Refilo\Model\Product\Image\UrlBuilder</argument>
        </arguments>
    </type>

    <type name="Magento\Search\Block\Adminhtml\Term\Edit\Form">
        <plugin name="filoblu_refilo_disable_url_validation" type="FiloBlu\Refilo\Plugins\Block\Adminhtml\Term\Edit\Form" sortOrder="9999" disabled="false"/>
    </type>

    <type name="FiloBlu\Refilo\Model\Exporter\SearchTerms">
        <arguments>
            <argument name="termExportable" xsi:type="object">FiloBlu\Refilo\Model\Exporter\DefaultSearchTermExportStrategy</argument>
            <argument name="searchTermAdapter" xsi:type="object">FiloBlu\Refilo\Model\Exporter\DefaultSearchTermAdapter</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Controller\Adminhtml\Exporter\Search">
        <arguments>
            <argument name="exporter" xsi:type="object">FiloBlu\Refilo\Model\Exporter\SearchTerms</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Controller\Adminhtml\Exporter\Synonyms">
        <arguments>
            <argument name="exporter" xsi:type="object">FiloBlu\Refilo\Model\Exporter\Synonyms</argument>
        </arguments>
    </type>

    <virtualType name="FiloBlu\Refilo\Model\ResourceModel\Product\CollectionFactory" type="Magento\Catalog\Model\ResourceModel\Product\CollectionFactory">
        <arguments>
            <argument name="instanceName" xsi:type="string">FiloBlu\Refilo\Model\ResourceModel\Product\Collection</argument>
        </arguments>
    </virtualType>

    <type name="Magento\GroupedProduct\Ui\DataProvider\Product\GroupedProductDataProvider">
        <arguments>
            <argument name="collectionFactory" xsi:type="object">FiloBlu\Refilo\Model\ResourceModel\Product\CollectionFactory</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Helper\Url">
        <arguments>
            <argument name="hrefLangConfig" xsi:type="object">FiloBlu\Refilo\Model\Config\Seo\DefaultHrefLangConfiguration</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Refilo\Remote\Entity\Provider\UrlProvider">
        <arguments>
            <argument name="urlProviders" xsi:type="array">
                <item name="cms-homepage" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\HomePageUrlProvider</item>
                <item name="cms" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\PageUrlProvider</item>
                <item name="category" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\CategoryUrlProvider</item>
                <item name="products" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\ProductUrlProvider</item>
                <item name="masterdata" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\MasterdataUrlProvider</item>
                <item name="disabled_products" xsi:type="object">FiloBlu\Refilo\Remote\Entity\Provider\DisabledProductUrlProvider</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\Indexer\Model\Config\Data">
        <plugin name="filoblu_refilo_disable_permission_indexer_if_not_enabled" type="FiloBlu\Refilo\Plugins\DisableCategoryPermissionIfNotEnabled" />
    </type>

    <type name="Magento\Quote\Model\Quote\Address\ToOrderAddress">
        <plugin name="convert_quote_address_to_order_address" type="FiloBlu\Refilo\Plugins\ConvertQuoteAddressToOrderAddress" sortOrder="999"/>
    </type>

    <type name="Magento\Sales\Block\Adminhtml\Order\View\Info">
        <plugin name="add_care_of_label" type="FiloBlu\Refilo\Plugins\AddCareOfLabel" sortOrder="99"/>
    </type>

    <type name="Magento\Catalog\Model\ResourceModel\Eav\Attribute">
        <plugin name="filoblu_refilo_add_category_attributes_settings" type="FiloBlu\Refilo\Plugins\Model\ResourceModel\Eav\AddCategoryDefaultSettings"/>
    </type>

    <type name="Magento\Sales\Api\Data\OrderAddressInterface">
        <plugin name="filoblu_refilo_add_care_of_label_to_address" type="FiloBlu\Refilo\Plugins\AddressAddCareOfLabel"/>
    </type>

    <!-- Custom configPaths variable to use in template email  -->
    <!-- Use this Class for Magento Version < 2.4.3  -->

    <!-- <type name="Magento\Variable\Model\Source\Variables">
        <arguments>
            <argument name="configPaths" xsi:type="array">
                <item name="web" xsi:type="array">
                    <item name="web/secure/refilo_storefront_secure_base_url" xsi:type="string">1</item>
                    <item name="web/unsecure/refilo_storefront_unsecure_base_url" xsi:type="string">1</item>
                </item>
            </argument>
        </arguments>
    </type> -->

        <!-- Instead use this Class for Magento Version >= 2.4.3  -->

    <!-- <type name="Magento\Variable\Model\Config\Structure\AvailableVariables">
        <arguments>
            <argument name="configPaths" xsi:type="array">
                <item name="web" xsi:type="array">
                    <item name="web/secure/refilo_storefront_secure_base_url" xsi:type="string">1</item>
                    <item name="web/unsecure/refilo_storefront_unsecure_base_url" xsi:type="string">1</item>
                </item>
            </argument>
        </arguments>
    </type> -->


    <type name="Magento\PageBuilder\Model\WidgetInitializerConfig">
        <arguments>
            <argument name="config" xsi:type="array">
                <item name="filoblu_slider" xsi:type="array">
                    <item name="default" xsi:type="array">
                        <item name="component" xsi:type="string">Magento_PageBuilder/js/content-type/slider/appearance/default/widget</item>
                        <item name="appearance" xsi:type="string">default</item>
                    </item>
                </item>
                <item name="filoblu_slide" xsi:type="array">
                    <item name="default" xsi:type="array">
                        <!--required argument-->
                        <item name="component" xsi:type="string">Magento_PageBuilder/js/content-type/slide/appearance/default/widget</item>
                        <!--optional if you need provide some config for your widget-->
                        <item name="config" xsi:type="array">
                            <item name="buttonSelector" xsi:type="string">.pagebuilder-slide-button</item>
                            <item name="showOverlay" xsi:type="string">hover</item>
                            <item name="dataRole" xsi:type="string">slide</item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\PageBuilder\Model\Config\FileResolver">
        <plugin name="filoblu_refilo_remove_pagebuilder_unsupporterd_tag" type="FiloBlu\Refilo\Plugins\RemovePagePuilderUnsupportedTags"/>
    </type>

    <!--  Plugin to set mview_state version_id in Snapshot locator class to execute list of changelogs during full reindex-->
    <type name="Magento\Indexer\Model\Indexer">
        <plugin name="filoblu_refilo_before_reindex_all" type="FiloBlu\Refilo\Plugins\Model\Indexer\BeforeReindexAll"/>
    </type>

    <type name="Magento\Catalog\Model\Category\DataProvider">
        <plugin name="filoblu_refilo_adapt_category_emotional_products_data" type="FiloBlu\Refilo\Plugins\Model\Category\AdaptEmotionalData" />
    </type>

    <type name="FiloBlu\Refilo\Model\Indexer\Locator\SnapshotMViewStateTable" shared="true"/>

    <type name="FiloBlu\Refilo\Model\Exporter\Translations">
        <arguments>
            <argument name="translate" xsi:type="object">FiloBlu\Refilo\Model\ResourceModel\Translate\Translate</argument>
        </arguments>
    </type>

    <type name="FiloBlu\Label\Block\Adminhtml\Coretranslate\Edit\Tab\General">
        <plugin name="filoblu_refilo_add_is_frontend_label" type="FiloBlu\Refilo\Plugins\AddLabelField"/>
    </type>

    <!-- MNTFOS-663 TEMPORARY OVERRIDE TO FIX CATEGORY FILTERS -->
<!--    <preference for="FiloBlu\Refilo\Helper\Catalog\ProductAttributeHelper" type="FiloBlu\Refilo\Helper\Catalog\ProductAttributeHelperExt" />-->

</config>
