<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2023 Amasty (https://www.amasty.com)
 * @package Free Gift MFTF 2 for Magento 2 (System)
 */-->
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">

    <section name="AdminPromoCartRuleSection">
        <element name="Reset" type="button" selector="#reset" timeout="30"/>
        <element name="Back" type="button" selector="#back" timeout="30"/>
        <element name="RuleName" type="input" selector="input[name='name']"/>
        <element name="Description" type="textarea" selector="textarea[name='description']"/>
        <element name="IsActiveSwitch" type="checkbox" selector="//div[@data-index='is_active']//label[@class='admin__actions-switch-label']"/>
        <element name="SelectWebsites" type="select" selector="//select[@name='website_ids']"/>
        <element name="SelectCustomerGroup" type="select" selector="//select[@name='customer_group_ids']"/>
        <element name="SelectCouponCode" type="select" selector="//select[@name='coupon_type']"/>
        <element name="CouponsCode" type="input" selector="//input[@name='coupon_code']"/>
        <element name="StatusValue" type="input" parameterized="true"
                 selector="//div[@data-index='is_active']//div[@class='admin__actions-switch']/input[@type='checkbox'][@value='{{ruleStatus}}']"/>
        <element name="RuleInformationTab" type="button" selector="//div[@data-index='rule_information']/div[@class='fieldset-wrapper-title']"/>
        <element name="ActionTab" type="button" selector="//div[@data-index='actions']/div[@class='fieldset-wrapper-title']"/>
        <element name="SelectAction" type="select" selector="//select[@name='simple_action']"/>
        <element name="DiscountAmount" type="input" selector="//input[@name='discount_amount']"/>
        <element name="NumberOfGiftItems" type="input" selector="//input[@name='discount_amount']"/>
        <element name="Type" type="select" selector="//select[@name='extension_attributes[ampromo_rule][type]']"/>
        <element name="PromoItems" type="input" selector="//input[@name='extension_attributes[ampromo_rule][sku]']"/>
        <element name="MaxQtyDiscountIsAppliedTo" type="input" selector="//input[@name='discount_qty']"/>
        <element name="MaxAmountOfDiscount" type="input" selector="//input[@name='extension_attributes[amrules][max_discount]']"/>
        <element name="DiscountQtyStep" type="input" selector="//input[@name='discount_step']"/>
        <element name="NumberOfYProducts" type="input" selector="//input[@name='extension_attributes[amrules][nqty]']"/>
        <element name="AfterN" type="input" selector="//input[@name='extension_attributes[amrules][eachm]']"/>
        <element name="SetItemsBySKU" type="input" selector="//input[@name='extension_attributes[amrules][promo_skus]']"/>
        <element name="SetItemsByCategoryIDs" type="input" selector="//input[@name='extension_attributes[amrules][promo_cats]']"/>
        <element name="ApplyToShippingAmount" type="checkbox" selector="//div[@data-index='apply_to_shipping']//label[@class='admin__actions-switch-label']"/>
        <element name="DiscardSubsequentRules" type="checkbox" selector="//div[@data-index='stop_rules_processing']//label[@class='admin__actions-switch-label']"/>
        <element name="ApplyTaxOnOriginalPrice" type="checkbox" selector="//div[@data-index='ampromorule[apply_tax]']//label[@class='admin__actions-switch-label']"/>
        <element name="ApplyShippingOnPromoFree" type="checkbox" selector="//div[@data-index='ampromorule[apply_shipping]']//label[@class='admin__actions-switch-label']"/>
        <element name="ActivateRule" type="checkbox" selector="//div[@data-index='is_active']//label[@class='admin__actions-switch-label']"/>
        <element name="DiscountTab" type="button" selector="//div[@data-index='ampromorule_items_price']/div[@class='fieldset-wrapper-title']"/>
        <element name="PromoItemsDiscountField" type="input" selector="//input[@name='extension_attributes[ampromo_rule][items_discount]']"/>
        <element name="MinimalPrice" type="input" selector="//input[@name='extension_attributes[ampromo_rule][minimal_items_price]']"/>
    </section>

</sections>

