<?xml version="1.0"?>
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <group id="mercadopago_adbpayment_checkout_credits" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
        <label>Mercado Crédito - Your customers can buy now and pay later</label>
        <frontend_model>MercadoPago\AdbPayment\Block\Adminhtml\System\Config\GroupRenderer</frontend_model>
        <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
            <label>Enabled</label>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/mercadopago_adbpayment_checkout_credits/active</config_path>
        </field>
        <field id="title" translate="label comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
            <label>Title</label>
            <comment>Payment method title at the store's checkout.</comment>
            <config_path>payment/mercadopago_adbpayment_checkout_credits/title</config_path>
        </field>
        <field id="expiration" translate="label comment" type="text" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
            <label>Deadline for payment</label>
            <comment>Calendar days.</comment>
            <validate>required-entry validate-number validate-zero-or-greater</validate>
            <config_path>payment/mercadopago_adbpayment_checkout_credits/expiration</config_path>
        </field>
        <field id="excluded" translate="label comment" type="multiselect" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="1" canRestore="0">
            <label>Removed payment method</label>
            <source_model>MercadoPago\AdbPayment\Model\Adminhtml\Source\MerchantPaymentMethods</source_model>
            <config_path>payment/mercadopago_adbpayment_checkout_credits/excluded</config_path>
            <comment>Select the payment methods you do NOT want to accept.</comment>
        </field>
        <group id="mercadopago_adbpayment_native_fields" translate="label comment" type="text" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
            <label>Common Payment Method Definitions</label>
            <field id="min_order_total" translate="label comment" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>Minimum order total</label>
                <comment>Minimum amount to pay with installments without card.</comment>
                <validate>validate-number validate-zero-or-greater</validate>
                <config_path>payment/mercadopago_adbpayment_checkout_credits/min_order_total</config_path>
            </field>
            <field id="max_order_total" translate="label comment" type="text" sortOrder="120" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>Maximum order amount</label>
                <comment>Maximum amount to pay with installments without card.</comment>
                <validate>validate-number validate-zero-or-greater</validate>
                <config_path>payment/mercadopago_adbpayment_checkout_credits/max_order_total</config_path>
            </field>
            <field id="specificcountry" translate="label comment" type="multiselect" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>Payment From Specific Countries</label>
                <comment>Countries eligible to use this payment method.</comment>
                <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                <config_path>payment/mercadopago_adbpayment_checkout_credits/specificcountry</config_path>
            </field>
            <field id="sort_order" translate="label comment" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                <label>Sort Order</label>
                <comment>Sets up in which order the payment methods will be shown at the Checkout.</comment>
                <frontend_class>validate-number</frontend_class>
                <config_path>payment/mercadopago_adbpayment_checkout_credits/sort_order</config_path>
            </field>
        </group>
    </group>
</include>
