<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="filoblu_tab" translate="label" sortOrder="1000">
            <label>FiloBlu</label>
        </tab>
        <section id="filoblu_flow" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Flow Options</label>
            <tab>filoblu_tab</tab>
            <resource>FiloBlu_Flow::config</resource>

            <group id="flow_ite" translate="label" type="text" sortOrder="15" showInDefault="1">
                <label>ITE Options</label>
                <field id="add_to_websites" translate="label" type="select" sortOrder="0"  showInDefault="1">
                    <label>Add to all websites</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="masterfile_website_mapping" translate="label" type="select" sortOrder="10" showInDefault="1">
                    <label>Masterfile/Websites Mapping</label>
                    <frontend_model>FiloBlu\Flow\Block\Adminhtml\System\Config\MappingFields</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                    <depends>
                        <field id="add_to_websites">0</field>
                    </depends>
                </field>
                <field id="copy_name_in_description" translate="label" type="select" sortOrder="0"  showInDefault="1">
                    <label>Copy product name in Description during product creation</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="copy_name_in_short_description" translate="label" type="select" sortOrder="0"  showInDefault="1">
                    <label>Copy product name in Short Description during product creation</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="disable_shop_status" translate="label" type="select" sortOrder="0"  showInDefault="1">
                    <label>Set Disable Shop Status To (if module is installed)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="hide_price_status" translate="label" type="select" sortOrder="0"  showInDefault="1">
                    <label>Set Hide Price Status To (if module is installed)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="flow_parse" translate="label" type="text" sortOrder="20" showInDefault="1">
                <label>Parse Option</label>
            </group>
            <group id="flow_process" translate="label" type="text" sortOrder="30" showInDefault="1">
                <label>Process Option</label>
                <field id="flow_assign_full_tree_category" translate="label" type="select" sortOrder="15"  showInDefault="1">
                    <label>Assign the full path of categories (_add_to_categorynew)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment><![CDATA[Yes: Products will be added to all the categories of the path<br />No: Products will be added only to the 'tree leaf' (last) category]]></comment>
                </field>
                <field id="flow_attribute_select" translate="label" type="multiselect" sortOrder="30" showInDefault="1">
                    <label>Attributi da Copiare in Configurabile</label>
                    <source_model>FiloBlu\Flow\Model\System\ProductAttributes</source_model>
                </field>
                <field id="flow_attribute_togrouped" translate="label" type="multiselect" sortOrder="40" showInDefault="1">
                    <label>Attributi da Copiare in Grouped</label>
                    <source_model>FiloBlu\Flow\Model\System\ProductAttributes</source_model>
                </field>
                <field id="flow_attribute_tochangewebsite" translate="label" type="multiselect" sortOrder="50" showInDefault="1">
                    <label>Attributi da Escludere nel cambio website</label>
                    <source_model>FiloBlu\Flow\Model\System\ProductAttributes</source_model>
                </field>
            </group>
            <group id="flow_clean" translate="label" type="text" sortOrder="20" showInDefault="1">
                <label>Clean Option</label>
                <field id="flow_clean_days" translate="label" type="text" sortOrder="40"  showInDefault="1">
                    <label>Clean Flows Before Days (leave blank for disable):</label>
                </field>
            </group>
            <group id="flow_images" translate="label" type="text" sortOrder="50" showInDefault="1">
                <label>Images Import Option</label>
                <field id="flow_images_force_clean" translate="label" type="select" sortOrder="10"  showInDefault="1">
                    <label>Force Clean Photos (remove all photos of product before upload)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="flow_images_clean_cache" translate="label" type="select" sortOrder="11"  showInDefault="1">
                    <label>Force Clean Photos Cache (remove the magento cache of a photo after removing the photo itself)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="flow_images_upload_unique" translate="label" type="select" sortOrder="12"  showInDefault="1">
                    <label>Always Upload Unique Photo Names (Magento will see them always as new)</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="flow_images_create_duplicates" translate="label" type="text" sortOrder="40"  showInDefault="1">
                    <label>Duplicate Images Of Simple Products With Same Attribute</label>
                    <comment>
                        <![CDATA[Import the SAME file jpg on all the parent's childs having the same super attribute CODE setted in this option<br />Empty field means turned off<br />Example: "color" then if a SIMPLE SKU image is parsed with color XYZ then all childs of that parent with color XYZ will have the same image]]>
                    </comment>
                </field>
            </group>
            <group id="flow_stock_option" translate="label" type="text" sortOrder="20" showInDefault="1">
                <label>Stock Option</label>
                <field id="flow_reserved_order_statuses" translate="label" type="multiselect" sortOrder="60"  showInDefault="1">
                    <label>Reserved Order Statuses</label>
                    <source_model>Magento\Sales\Model\ResourceModel\Order\Status\Collection</source_model>
                </field>
            </group>
            <group id="flow_email_notification" translate="label" type="text" sortOrder="110" showInDefault="1">
                <label>Email Notification</label>
                <field id="flow_email_notify_address" translate="label" type="text" sortOrder="10"  showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Recipients of import breakdowns notifications</label>
                    <comment><![CDATA[Enter email address separated by a comma]]></comment>
                </field>
                <field id="template_notification" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Email template</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                </field>
            </group>
            <group id="flow_stock_indexer" translate="label" type="text" sortOrder="110" showInDefault="1">
                <label>Flow Stock Indexer Configuration</label>
                <field id="enable" translate="label" type="select" sortOrder="10"  showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="configurable_enable" translate="label" type="select" sortOrder="10"  showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable Configurable Reindex</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
        </section>
    </system>
</config>
