<?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">

    <!-- Custom page builder content type -->
    <virtualType name="AppearanceSourceFilobluDefault" type="Magento\PageBuilder\Model\Source\VisualSelect">
        <arguments>
            <argument name="optionsSize" xsi:type="string">large</argument>
            <argument name="optionsData" xsi:type="array">
                <item name="0" xsi:type="array">
                    <item name="value" xsi:type="string">default</item>
                    <item name="title" xsi:type="string">Default</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="AppearanceSourceFilobluProducts" type="Magento\PageBuilder\Model\Source\VisualSelect">
        <arguments>
            <argument name="optionsSize" xsi:type="string">large</argument>
            <argument name="optionsData" xsi:type="array">
                <item name="0" xsi:type="array">
                    <item name="value" xsi:type="string">grid</item>
                    <item name="title" xsi:type="string">Product Grid</item>
                    <item name="icon" xsi:type="string">Magento_PageBuilder::css/images/content-type/products/appearance/grid.svg</item>
                </item>
                <item name="1" xsi:type="array">
                    <item name="value" xsi:type="string">carousel</item>
                    <item name="title" xsi:type="string">Product Carousel</item>
                    <item name="icon" xsi:type="string">Magento_PageBuilder::css/images/content-type/products/appearance/carousel.svg</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="AppearanceSourceFilobluInstagram" type="Magento\PageBuilder\Model\Source\VisualSelect">
        <arguments>
            <argument name="optionsSize" xsi:type="string">large</argument>
            <argument name="optionsData" xsi:type="array">
                <item name="0" xsi:type="array">
                    <item name="value" xsi:type="string">grid</item>
                    <item name="title" xsi:type="string">Post Grid</item>
                    <item name="icon" xsi:type="string">Magento_PageBuilder::css/images/content-type/products/appearance/grid.svg</item>
                </item>
                <item name="1" xsi:type="array">
                    <item name="value" xsi:type="string">carousel</item>
                    <item name="title" xsi:type="string">Post Carousel</item>
                    <item name="icon" xsi:type="string">Magento_PageBuilder::css/images/content-type/products/appearance/carousel.svg</item>
                </item>
            </argument>
        </arguments>
    </virtualType>

    <type name="Magento\PageBuilder\Model\Config\ContentType\AdditionalData\Provider\Wysiwyg\Config">
        <arguments>
            <argument name="editors" xsi:type="array">
                <item name="mage/adminhtml/wysiwyg/tiny_mce/tinymce5Adapter" xsi:type="array">
                    <item name="component" xsi:type="string">Magento_PageBuilder/js/wysiwyg/tinymce</item>
                    <item name="component_initializers" xsi:type="array">
                        <item name="filoblu_slide" xsi:type="string">Magento_PageBuilder/js/content-type/slide/wysiwyg/tinymce/component-initializer</item>
                    </item>
                    <item name="config_modifiers" xsi:type="array">
                        <item name="filoblu_slide" xsi:type="string">Magento_PageBuilder/js/content-type/slide/wysiwyg/tinymce/config-modifier</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </type>

   <type name="Magento\PageBuilder\Model\WidgetInitializerConfig">
        <arguments>
            <argument name="config" xsi:type="array">
                <item name="filoblu_products" xsi:type="array">
                    <item name="default" xsi:type="array">
                        <item name="component" xsi:type="string">Magento_PageBuilder/js/content-type/products/appearance/carousel/widget</item>
                        <item name="appearance" xsi:type="string">carousel</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\PageBuilder\Model\Stage\RendererPool">
        <arguments>
            <argument name="renderers" xsi:type="array">
                <item name="default" xsi:type="object">Magento\PageBuilder\Model\Stage\Renderer\Block</item>
                <item name="products" xsi:type="object">Magento\PageBuilder\Model\Stage\Renderer\WidgetDirective</item>
                <item name="block" xsi:type="object">Magento\PageBuilder\Model\Stage\Renderer\CmsStaticBlock</item>
                <item name="filoblu_products" xsi:type="object">Magento\PageBuilder\Model\Stage\Renderer\WidgetDirective</item>
            </argument>
        </arguments>
    </type>

    <type name="Magento\CatalogWidget\Block\Product\ProductsList">
        <plugin name="refilo_product_widget_product_list" type="FiloBlu\Refilo\Plugins\CatalogWidget\Block\Product\ProductsListPlugin" sortOrder="10"/>
    </type>
</config>
