<?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="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="store_information" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="suburb" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Suburb</label>
                    <can_be_empty>1</can_be_empty>
                </field>
            </group>
        </section>

        <section id="carriers" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            <group id="bobgo" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Bob Go</label>
                <field id="version" translate="label" type="label" sortOrder="0" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Version</label>
                    <frontend_model>BobGroup\BobGo\Block\System\Config\Form\Field\Version</frontend_model>
                </field>
                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Enable Bob Go rates at checkout</label>
                    <comment>When this setting is enabled, your customers will be presented with shipping rates at checkout, as configured on the Bob Go platform under Rates at checkout.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="additional_info" translate="label" type="select" sortOrder="7" showInDefault="1" showInWebsite="1">
                    <label>Show additional rate information</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Displays the delivery timeframe and additional service level description, as configured on Bob Go.</comment>
                </field>

                <!-- Enable Webhooks Checkbox -->
                <field id="enable_webhooks" translate="label" type="select" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Enable webhooks</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Enable or disable the webhook functionality for Bob Go.</comment>
                </field>

                <!-- Webhook Key Input Field -->
                <field id="webhook_key" translate="label" type="text" sortOrder="9" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Webhook key</label>
                    <comment>Enter Bob Go integration consumer secret key for webhook authentication.</comment>
                    <depends>
                        <field id="enable_webhooks">1</field>
                    </depends>
                </field>
<!--                Hiding the `Enable Track My Order` setting for now-->
<!--                To show the setting again `showInDefault="1" showInWebsite="1" showInStore="1"` -->
                <field id="enable_track_order" translate="label" type="select" sortOrder="10" showInDefault="0" showInWebsite="0" showInStore="0">
                    <label>Enable Track My Order</label>
                    <comment>When this setting is enabled, your customers will be presented with a page to track orders.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
        </section>
    </system>
</config>