<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="refilo" sortOrder="1">
        <settings>
            <label>Refilo</label>
            <collapsible>true</collapsible>
            <opened>false</opened>
        </settings>
        <field name="refilo_page_identifier" sortOrder="0" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <visible>true</visible>
                <elementTmpl>ui/form/element/input</elementTmpl>
                <label translate="true">Refilo Page Identifier</label>
            </settings>
        </field>
        <field name="customer_group" sortOrder="120" formElement="multiselect">
            <settings>
                <dataType>text</dataType>
                <label translate="true">Customer Group</label>
                <dataScope>customer_group</dataScope>
                <visible>true</visible>
            </settings>
            <formElements>
                <multiselect>
                    <settings>
                        <options class="FiloBlu\Refilo\Model\ResourceModel\Group\Collection" />
                    </settings>
                </multiselect>
            </formElements>
        </field>
        <field name="refilo_layout" sortOrder="1" formElement="select">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="default" xsi:type="string">full-width</item>
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                <label translate="true">Refilo Layout</label>
                <dataScope>refilo_layout</dataScope>
            </settings>
            <formElements>
                <select>
                    <settings>
                        <options>
                            <option name="1" xsi:type="array">
                                <item name="value" xsi:type="string">full-width</item>
                                <item name="label" xsi:type="string">Full Width</item>
                            </option>
                            <option name="2" xsi:type="array">
                                <item name="value" xsi:type="string">boxed</item>
                                <item name="label" xsi:type="string">Boxed</item>
                            </option>
                            <option name="3" xsi:type="array">
                                <item name="value" xsi:type="string">contained</item>
                                <item name="label" xsi:type="string">Contained</item>
                            </option>
                        </options>
                    </settings>
                </select>
            </formElements>
        </field>
        <field name="refilo_template" sortOrder="10" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <visible>true</visible>
                <elementTmpl>ui/form/element/input</elementTmpl>
                <label translate="true">Refilo Template</label>
            </settings>
        </field>
        <field name="heading_visible" sortOrder="20" formElement="checkbox">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                    <item name="default" xsi:type="number">1</item>
                </item>
            </argument>
            <settings>
                <dataType>boolean</dataType>
                <label translate="true">Heading Visible</label>
                <dataScope>heading_visible</dataScope>
            </settings>
            <formElements>
                <checkbox>
                    <settings>
                        <valueMap>
                            <map name="false" xsi:type="number">0</map>
                            <map name="true" xsi:type="number">1</map>
                        </valueMap>
                        <prefer>toggle</prefer>
                    </settings>
                </checkbox>
            </formElements>
        </field>
        <field name="breadcrumbs_visible" sortOrder="30" formElement="checkbox">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                    <item name="default" xsi:type="number">1</item>
                </item>
            </argument>
            <settings>
                <dataType>boolean</dataType>
                <label translate="true">Breadcrumbs Visible</label>
                <dataScope>breadcrumbs_visible</dataScope>
            </settings>
            <formElements>
                <checkbox>
                    <settings>
                        <valueMap>
                            <map name="false" xsi:type="number">0</map>
                            <map name="true" xsi:type="number">1</map>
                        </valueMap>
                        <prefer>toggle</prefer>
                    </settings>
                </checkbox>
            </formElements>
        </field>
        <field name="header_type" sortOrder="40" formElement="select">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="default" xsi:type="string">filled</item>
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                <label translate="true">Header Type</label>
                <dataScope>header_type</dataScope>
            </settings>
            <formElements>
                <select>
                    <settings>
                        <options>
                            <option name="1" xsi:type="array">
                                <item name="value" xsi:type="string">filled</item>
                                <item name="label" xsi:type="string">Filled</item>
                            </option>
                            <option name="2" xsi:type="array">
                                <item name="value" xsi:type="string">transparent</item>
                                <item name="label" xsi:type="string">Trasparent</item>
                            </option>
                            <option name="3" xsi:type="array">
                                <item name="value" xsi:type="string">custom_1</item>
                                <item name="label" xsi:type="string">Custom 1</item>
                            </option>
                            <option name="4" xsi:type="array">
                                <item name="value" xsi:type="string">custom_2</item>
                                <item name="label" xsi:type="string">Custom 2</item>
                            </option>
                        </options>
                    </settings>
                </select>
            </formElements>
        </field>
        <field name="css_class" sortOrder="50" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <visible>true</visible>
                <elementTmpl>ui/form/element/input</elementTmpl>
                <label translate="true">CSS Class</label>
            </settings>
        </field>
        <field name="css_style" sortOrder="60">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="formElement" xsi:type="string">textarea</item>
                    <item name="cols" xsi:type="number">15</item>
                    <item name="rows" xsi:type="number">10</item>
                    <item name="label" translate="true" xsi:type="string">CSS Style</item>
                    <item name="dataType" translate="true" xsi:type="string">text</item>
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
        </field>
        <field name="robots" sortOrder="70" formElement="select">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="default" xsi:type="string">index,follow</item>
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                <label translate="true">Robots</label>
                <dataScope>robots</dataScope>
            </settings>
            <formElements>
                <select>
                    <settings>
                        <options>
                            <option name="1" xsi:type="array">
                                <item name="value" xsi:type="string">index,follow</item>
                                <item name="label" xsi:type="string">Index Follow</item>
                            </option>
                            <option name="2" xsi:type="array">
                                <item name="value" xsi:type="string">noindex,follow</item>
                                <item name="label" xsi:type="string">NoIndex Follow</item>
                            </option>
                            <option name="3" xsi:type="array">
                                <item name="value" xsi:type="string">index,nofollow</item>
                                <item name="label" xsi:type="string">Index NoFollow</item>
                            </option>
                            <option name="4" xsi:type="array">
                                <item name="value" xsi:type="string">noindex,nofollow</item>
                                <item name="label" xsi:type="string">NoIndex NoFollow</item>
                            </option>
                        </options>
                    </settings>
                </select>
            </formElements>
        </field>
    </fieldset>
    <fieldset name="search_engine_optimisation">
        <field name="og_data_image" formElement="imageUploader">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">page</item>
                </item>
            </argument>
            <settings>
                <label translate="true">OG Data Image</label>
                <componentType>imageUploader</componentType>
                <dataScope>og_data_image</dataScope>
            </settings>
            <formElements>
                <imageUploader>
                    <settings>
                        <allowedExtensions>jpg jpeg gif png svg</allowedExtensions>
                        <maxFileSize>4194304</maxFileSize>
                        <uploaderConfig>
                            <param xsi:type="string" name="url">filoblu_refilo/cmspage/image_upload</param>
                        </uploaderConfig>
                    </settings>
                </imageUploader>
            </formElements>
        </field>
    </fieldset>
</form>
