<?xml version="1.0" encoding="UTF-8"?>
<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="esb" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <class>separator-top</class>
            <label>ESB</label>
            <tab>filoblu_tab</tab>
            <resource>FiloBlu_Esb::config_esb</resource>
            <group id="shipment" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label">
                <label>Shipment</label>
                <field id="source_selection_algorithm" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Source selection algorithm</label>
                    <source_model>FiloBlu\Esb\Model\Config\Source\ShippingSelectionAlgorithm</source_model>
                </field>
            </group>
            <group id="ack" translate="label" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>Acknowledge</label>
                <field id="flows" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Flows</label>
                    <frontend_model>FiloBlu\Esb\Block\Adminhtml\System\Config\Ack</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                </field>
            </group>
            <group id="print_documents" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                <label>Print Documents button</label>
                <field id="document_folder" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Document Folder</label>
                    <comment>The directory path is relative to var folder</comment>
                </field>
                <field id="enabled_countries" translate="label" type="multiselect" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                    <label>Show Button in </label>
                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                </field>
            </group>
            <group id="external_invoice" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>External Invoice Endpoint Behaviour</label>
                <field id="create_invoice" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Create Invoice</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Create Invoice inside External Invoice Endpoint</comment>
                </field>
                <field id="skip_creation_if_exists" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Skip creation if invoice already exists</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Skip creation if invoice already exists. If set to NO exception will be thrown</comment>
                    <depends>
                        <field id="*/*/create_invoice">1</field>
                    </depends>
                </field>
            </group>
            <group id="gwmapping" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Gift Wrap product mapping</label>
                <field id="gwproducts" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Gift Wrap products</label>
                    <frontend_model>FiloBlu\Esb\Block\Adminhtml\System\Config\Gwproducts</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                    <if_module_enabled>Magento_GiftWrapping</if_module_enabled>
                </field>
            </group>
        </section>
        <section id="payment">
            <group id="msp_cashondelivery">
                <field id="order_status">
                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\Newprocessing</source_model>
                </field>
            </group>
        </section>
    </system>
</config>
