<?xml version="1.0" encoding="UTF-8"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <section id="refilo_sales" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
        <class>separator-top</class>
        <label>Sales</label>
        <tab>refilo</tab>
        <resource>FiloBlu_Refilo::refilo_config</resource>
        <group id="cheapest_carrier" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Show Cheapest Carrier</label>
            <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
            </field>
        </group>
        <group id="gift_message" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Gift Message</label>
            <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
            </field>
        </group>
        <group id="gift_wrap" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Gift Wrap</label>
            <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
            </field>
        </group>
        <group id="checkout" translate="label" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Checkout</label>
            <field id="disable_terms_and_conditions" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Disable terms and conditions</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="order_selection_strategy_enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enable Order Selection Strategy</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="order_selection_strategy" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Order Selection Strategy</label>
                <source_model>FiloBlu\Refilo\Block\Adminhtml\Option\OrderSelectionStrategy</source_model>
                <comment>Order selection stratetegy to assign to customer</comment>
                <depends>
                    <field id="order_selection_strategy_enabled">1</field>
                </depends>
            </field>
            <field id="invoice_external_vat_validation_enabled" translate="label comment"  type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Invoice external vat validation</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                <if_module_enabled>FiloBlu_VatValidatorApi</if_module_enabled>
            </field>
        </group>
        <group id="cart" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Cart</label>
            <field id="shipping_estimation_strategy" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Shipping estimation strategy</label>
                <source_model>FiloBlu\Refilo\Block\Adminhtml\Option\ShippingEstimationOptionSource</source_model>
            </field>
            <field id="show_shipping_estimation_in_cart" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Display shipping estimation in cart</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="exclude_price_zero_for_shipping_estimation_in_cart" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Exclude price zero for shipping estimation in cart</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>
        <group id="sales_order_price_rounding" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
            <label>Sales Order Price Rounding</label>
            <field id="enable_sales_order_price_rounding" translate="label" type="select" showInWebsite="1" sortOrder="10" showInDefault="1">
                <label>Use price custom rounding on place order</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
            <field id="sales_order_price_rouding_decimal" translate="label" type="text" showInWebsite="1" sortOrder="20" showInDefault="1">
                <label>Number of decimals</label>
                <validate>no-whitespace</validate>
                <depends>
                    <field id="refilo_sales/sales_order_price_rounding/enable_sales_order_price_rounding">1</field>
                </depends>
            </field>
            <field id="sales_order_price_rouding_strategy" translate="label" type="select" showInWebsite="1" sortOrder="30" showInDefault="1">
                <label>Rounding strategy</label>
                <source_model>FiloBlu\Refilo\Model\Config\Source\RoundingStrategy</source_model>
                <validate>required-entry</validate>
                <depends>
                    <field id="refilo_sales/sales_order_price_rounding/enable_sales_order_price_rounding">1</field>
                </depends>
            </field>
        </group>
        <group id="order_email_template" translate="label" type="text" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Order Email Template</label>
            <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Enabled</label>
                <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
            </field>
            <field id="size_product_image" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Size Product Image</label>
                <comment>Use a numeric value es: 60</comment>
                <depends>
                    <field id="refilo_sales/order_email_template/enabled">1</field>
                </depends>
            </field>
        </group>
        <group id="coupon" translate="label" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Coupon</label>
            <field id="disabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Disabled</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>
        <group id="in_store_order_dashboard" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>In Store Order Dashboard</label>
            <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>View In Customer Order Dashboard</label>
                <comment>View in store order in customer order dashboard</comment>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>
    </section>
</include>
