<?xml version="1.0" ?>
<!--
/**
 * Hyvä Themes - https://hyva.io
 * Copyright © Hyvä Themes 2022-present. All rights reserved.
 * This product is licensed per Magento install
 * See https://hyva.io/license
 */
-->
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd"
>
    <group id="address_form"
           showInDefault="1"
           showInStore="1"
           showInWebsite="1"
           sortOrder="70"
           translate="label"
    >
        <label>Address Forms</label>

        <group id="street"
               showInDefault="1"
               showInStore="1"
               showInWebsite="1"
               sortOrder="10"
               translate="label comment"
        >
            <label>Street Address Fields</label>

            <comment>
                <![CDATA[Customize the labels and validation for street address fields in the Hyvä checkout shipping and billing address forms.<br /><br />

                <strong>Labels:</strong> Enter a custom label for each street line, or leave blank to display no label. Street Line 1 always requires a label.<br /><br />

                <strong>Required:</strong> Select "Yes" to make the field mandatory for customers.<br /><br />

                <strong>Note:</strong> The number of visible street lines can be configured at <strong>Stores > Configuration > Customers > Customer Configuration > Name and Address Options</strong>.]]>
            </comment>

            <field id="field_label_0"
                   translate="label"
                   type="text"
                   sortOrder="10"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 1 Label</label>
                <validate>required-entry</validate>
            </field>

            <field id="field_required_0"
                   translate="label"
                   type="select"
                   sortOrder="15"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 1 Required</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>

            <field id="field_label_1"
                   translate="label"
                   type="text"
                   sortOrder="20"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 2 Label</label>
            </field>

            <field id="field_required_1"
                   translate="label"
                   type="select"
                   sortOrder="25"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 2 Required</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>

            <field id="field_label_2"
                   translate="label"
                   type="text"
                   sortOrder="30"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 3 Label</label>
            </field>

            <field id="field_required_2"
                   translate="label"
                   type="select"
                   sortOrder="35"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 3 Required</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>

            <field id="field_label_3"
                   translate="label"
                   type="text"
                   sortOrder="40"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 4 Label</label>
            </field>

            <field id="field_required_3"
                   translate="label"
                   type="select"
                   sortOrder="45"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Street Line 4 Required</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>

        <group id="postcode"
               showInDefault="1"
               showInStore="1"
               showInWebsite="1"
               sortOrder="20"
               translate="label"
        >
            <label>Postcode</label>

            <field id="enable_format_validation"
                   translate="label comment"
                   type="select"
                   sortOrder="10"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Validate Postcode Format</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>

                <comment>
                    <![CDATA[Validates the entered Zip/Postal Code against the format configured for the selected
                    country. The formats originate from the Magento <strong>zip_codes.xml</strong> configuration.
                    Countries without a configured format are never validated.]]>
                </comment>
            </field>
        </group>

        <group id="postcode"
               showInDefault="1"
               showInStore="1"
               showInWebsite="1"
               sortOrder="20"
               translate="label"
        >
            <label>Postcode</label>

            <field id="enable_format_validation"
                   translate="label comment"
                   type="select"
                   sortOrder="10"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1"
            >
                <label>Validate Postcode Format</label>
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>

                <comment>
                    <![CDATA[Validates the entered Zip/Postal Code against the format configured for the selected
                    country. The formats originate from the Magento <strong>zip_codes.xml</strong> configuration.
                    Countries without a configured format are never validated.]]>
                </comment>
            </field>
        </group>
    </group>
</include>
