<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Special Promotions Base for Magento 2
 */-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="amrules" translate="label" type="text" sortOrder="191616" showInDefault="1" showInWebsite="1" showInStore="1">
            <resource>Amasty_Rules::config_rules</resource>
            <class>separator-top</class>
            <label>Special Promotions</label>
            <tab>amasty</tab>
            <group id="amasty_information" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Information</label>
                <frontend_model>Amasty\Rules\Block\Adminhtml\System\Config\Information</frontend_model>
            </group>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General</label>
                <field id="options_values" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Check Special Options Values</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="show_empty_discount" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Show Rule Label if Discount Amount is 0</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Disable this setting to hide the labels of Magento and Amasty cart price rules from order summary if discount amount is 0.</comment>
                </field>
            </group>
            <group id="skip_price" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Skip Settings</label>
                <field id="notice" translate="label"
                       type="Amasty\Rules\Block\Adminhtml\System\Config\Notice" sortOrder="9" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Skip options are available for Amasty actions only.</label>
                </field>
                <field id="skip_special_price" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Skip Items with Special Price</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="skip_tier_price" translate="label comment" type="select" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Skip Items with Tier Price</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="skip_special_price_configurable" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Skip Configurable Items when Child has Special Price</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="discount_breakdown" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Discount Breakdown</label>
                <field id="enable" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Show Discount Breakdown</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="discount_dropdown" translate="label" type="text" sortOrder="35" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Discount Dropdown</label>
                <frontend_model>Amasty\Rules\DiscountDropdownPromoFieldset</frontend_model>
                <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enabled</label>
                    <comment>Enable this setting to allow customers to view and select applicable discounts by clicking on the Apply Coupon Code field. Please note that the setting does not take effect if Amasty Multiple Coupons extension is enabled.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="add_rule_name" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Add Rule Name</label>
                    <comment>When enabled, adds the cart price rule name to the discount dropdown.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="enabled">1</field>
                    </depends>
                </field>
                <field id="add_rule_description" translate="label comment" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Add Rule Description</label>
                    <comment>When enabled, adds the cart price rule description to the discount dropdown.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="enabled">1</field>
                    </depends>
                </field>
                <field id="add_rule_date" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Add Expiration Date</label>
                    <comment>When enabled, adds the cart price rule expiration date to the discount dropdown.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="enabled">1</field>
                    </depends>
                </field>
            </group>
            <group id="discount_debug" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Debug</label>
                <field id="enable_debug" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Enable Debug Mode</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="allowed_ip" translate="label comment" type="text" sortOrder="70" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Show Debug Information Only For</label>
                    <comment><![CDATA[Comma separated IP addresses]]></comment>
                </field>
            </group>
        </section>
    </system>
</config>
