<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="other_settings">
        <fieldset name="watermark">
            <settings>
                <level>1</level>
                <collapsible>true</collapsible>
                <label translate="true">Product Image Watermarks</label>
            </settings>
            <fieldset name="image" sortOrder="10">
                <settings>
                    <level>2</level>
                    <label translate="true">Base</label>
                </settings>
                <field name="watermark_image_image" formElement="imageUploader">
                    <settings>
                        <notice translate="true">Allowed file types: jpeg, gif, png.</notice>
                        <label translate="true">Image</label>
                        <componentType>imageUploader</componentType>
                    </settings>
                    <formElements>
                        <imageUploader>
                            <settings>
                                <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                                <maxFileSize>2097152</maxFileSize>
                                <uploaderConfig>
                                    <param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
                                </uploaderConfig>
                            </settings>
                        </imageUploader>
                    </formElements>
                </field>
                <field name="watermark_image_imageOpacity" formElement="input">
                    <settings>
                        <validation>
                            <rule name="validate-number" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <addAfter>%</addAfter>
                        <label translate="true">Image Opacity</label>
                        <dataScope>watermark_image_imageOpacity</dataScope>
                    </settings>
                </field>
                <field name="watermark_image_size" component="Magento_Catalog/component/image-size-field" formElement="input">
                    <settings>
                        <notice translate="true">Example format: 200x300.</notice>
                        <validation>
                            <rule name="validate-image-size-range" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <label translate="true">Image Size</label>
                        <dataScope>watermark_image_size</dataScope>
                    </settings>
                </field>
                <field name="watermark_image_position" formElement="select">
                    <settings>
                        <dataType>text</dataType>
                        <label translate="true">Image Position</label>
                        <dataScope>watermark_image_position</dataScope>
                    </settings>
                    <formElements>
                        <select>
                            <settings>
                                <options class="Magento\Catalog\Model\Config\Source\Watermark\Position"/>
                            </settings>
                        </select>
                    </formElements>
                </field>
            </fieldset>
            <fieldset name="thumbnail" sortOrder="20">
                <settings>
                    <level>2</level>
                    <label translate="true">Thumbnail</label>
                </settings>
                <field name="watermark_thumbnail_image" formElement="imageUploader">
                    <settings>
                        <label translate="true">Image</label>
                        <componentType>imageUploader</componentType>
                    </settings>
                    <formElements>
                        <imageUploader>
                            <settings>
                                <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                                <maxFileSize>2097152</maxFileSize>
                                <uploaderConfig>
                                    <param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
                                </uploaderConfig>
                            </settings>
                        </imageUploader>
                    </formElements>
                </field>
                <field name="watermark_thumbnail_imageOpacity" formElement="input">
                    <settings>
                        <validation>
                            <rule name="validate-number" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <addAfter>%</addAfter>
                        <label translate="true">Image Opacity</label>
                        <dataScope>watermark_thumbnail_imageOpacity</dataScope>
                    </settings>
                </field>
                <field name="watermark_thumbnail_size" component="Magento_Catalog/component/image-size-field" formElement="input">
                    <settings>
                        <notice translate="true">Example format: 200x300.</notice>
                        <validation>
                            <rule name="validate-image-size-range" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <label translate="true">Image Size</label>
                        <dataScope>watermark_thumbnail_size</dataScope>
                    </settings>
                </field>
                <field name="watermark_thumbnail_position" formElement="select">
                    <settings>
                        <dataType>text</dataType>
                        <label translate="true">Image Position</label>
                        <dataScope>watermark_thumbnail_position</dataScope>
                    </settings>
                    <formElements>
                        <select>
                            <settings>
                                <options class="Magento\Catalog\Model\Config\Source\Watermark\Position"/>
                            </settings>
                        </select>
                    </formElements>
                </field>
            </fieldset>
            <fieldset name="small_image" sortOrder="30">
                <settings>
                    <level>2</level>
                    <label translate="true">Small</label>
                </settings>
                <field name="watermark_small_image_image" formElement="imageUploader">
                    <settings>
                        <label translate="true">Image</label>
                        <componentType>imageUploader</componentType>
                    </settings>
                    <formElements>
                        <imageUploader>
                            <settings>
                                <allowedExtensions>jpg jpeg gif png</allowedExtensions>
                                <maxFileSize>2097152</maxFileSize>
                                <uploaderConfig>
                                    <param xsi:type="string" name="url">theme/design_config_fileUploader/save</param>
                                </uploaderConfig>
                            </settings>
                        </imageUploader>
                    </formElements>
                </field>
                <field name="watermark_small_image_imageOpacity" formElement="input">
                    <settings>
                        <validation>
                            <rule name="validate-number" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <addAfter>%</addAfter>
                        <label translate="true">Image Opacity</label>
                        <dataScope>watermark_small_image_imageOpacity</dataScope>
                    </settings>
                </field>
                <field name="watermark_small_image_size" component="Magento_Catalog/component/image-size-field" formElement="input">
                    <settings>
                        <notice translate="true">Example format: 200x300.</notice>
                        <validation>
                            <rule name="validate-image-size-range" xsi:type="boolean">true</rule>
                        </validation>
                        <dataType>text</dataType>
                        <label translate="true">Image Size</label>
                        <dataScope>watermark_small_image_size</dataScope>
                    </settings>
                </field>
                <field name="watermark_small_image_position" formElement="select">
                    <settings>
                        <dataType>text</dataType>
                        <label translate="true">Image Position</label>
                        <dataScope>watermark_small_image_position</dataScope>
                    </settings>
                    <formElements>
                        <select>
                            <settings>
                                <options class="Magento\Catalog\Model\Config\Source\Watermark\Position"/>
                            </settings>
                        </select>
                    </formElements>
                </field>
            </fieldset>
        </fieldset>
    </fieldset>
</form>
