<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="checkout" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Checkout</label>
            <tab>sales</tab>
            <resource>Magento_Checkout::checkout</resource>
            <group id="getaddress_autocomplete" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Address Autocomplete (getAddress.io)</label>
                <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable Address Autocomplete</label>
                    <comment>Enable getAddress.io address autocomplete functionality in checkout</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="api_key" translate="label comment" type="password" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>getAddress.io API Key</label>
                    <comment>Get your API key from https://getaddress.io. Sign up for a free account and generate an API key.</comment>
                    <validate>required-entry</validate>
                </field>
            </group>
        </section>
    </system>
</config>
