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

    <section name="AdminProductLabelProfileSection">
        <element name="OptionsTab" type="block"
                 selector="//span[contains(string(),'{{var1}}')]"
                 parameterized="true"/>
        <element name="NameField" type="input" selector="//div[@class='admin__field _required']//input"/>
        <element name="SettingToggle" type="select"
                 selector="//input[@name='{{var1}}']/ancestor::div[@class='admin__actions-switch']"
                 parameterized="true"/>
        <element name="SettingToggleWithValue" type="select"
                 selector="//input[@name='{{var1}}' and @value='{{var2}}']/ancestor::div[@class='admin__actions-switch']"
                 parameterized="true"/>
        <element name="PriorityField" type="input" selector="//input[@name='priority']"/>
        <element name="StoreMultiSelect" type="multiselect" selector="//select[@name='stores']"/>
        <element name="CustomerGroupMultiSelect" type="multiselect" selector="//select[@name='customer_group_ids']"/>
        <element name="ShowFromField" type="select" selector="//input[@name='active_from']"/>
        <element name="ShowToField" type="select" selector="//input[@name='active_to']"/>
        <element name="LabelTypeSelect" type="block"
                 selector="//div[@data-index='{{var1}}_label_type']//td[contains(string(),'{{var2}}')]"
                 parameterized="true"/>
        <element name="LabelPositionSelect" type="block"
                 selector="//div[@data-index='{{var1}}_position']//tbody/tr[{{var2}}]/td[{{var3}}]"
                 parameterized="true"/>
        <element name="LabelTextField" type="input" selector="//textarea[@name='{{var1}}_label_text']"
                 parameterized="true"/>
        <element name="TextColorField" type="input" selector="//input[@name='{{var1}}_color']" parameterized="true"/>
        <element name="TextSizeField" type="input" selector="//input[@name='{{var1}}_size']" parameterized="true"/>
        <element name="AdvancedSettingsCSSField" type="input" selector="//textarea[@name='{{var1}}_style']"
                 parameterized="true"/>
        <element name="ShapeTypeSelect" type="block"
                 selector="//div[@class='amlabel-shape']/img[@alt='{{var1}}']"
                 parameterized="true"/>
        <element name="LabelColorField" type="input" selector="//input[@name='{{var1}}_label_shape_color']"
                 parameterized="true"/>
        <element name="LabelSizeField" type="input" selector="//input[@name='{{var1}}_image_size']"
                 parameterized="true"/>
        <element name="UploadImageButton" type="button" selector="//input[@name='{{var1}}_image']"
                 parameterized="true"/>
        <element name="OkButton" type="button"
                 selector="//button[contains(string(),'OK')]"
                 timeout="2"/>
        <element name="LabelConditionTab" type="button"
                 selector="//div[@data-index='product_conditions']/div[@class='fieldset-wrapper-title']"/>
        <element name="LabelConditionTabOpen" type="block"
                 selector="//div[@data-index='product_conditions']/div[@data-state-collapsible='open']"/>
        <element name="LabelButtonGlobalConditions" type="button"
                 selector="//div[@data-index='product_conditions']//span[@class='rule-param rule-param-new-child']"/>
        <element name="LabelConditionSelectOption" type="select"
                 selector="//div[@data-index='product_conditions']//select[@id='conditions__1__new_child']"/>
        <element name="TooltipStatus" type="select" selector="//select[@name='label_tooltip_status']"/>
        <element name="TooltipText" type="textarea" selector="//textarea[@name='label_tooltip_text']"/>
    </section>
</sections>
