<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright Magmodules.eu. All rights reserved.
  ~ See COPYING.txt for license details.
  -->

<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd">
    <group id="mollie_methods_expresscomponents" translate="label" type="text" sortOrder="100" showInDefault="1"
           showInWebsite="1" showInStore="1">
        <frontend_model>Mollie\Payment\Block\Adminhtml\System\Config\GroupFrontendModel</frontend_model>

        <label>Express Components</label>
        <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Enabled</label>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <config_path>payment/mollie_methods_expresscomponents/active</config_path>
            <comment>
                <![CDATA[<strong>Please note:</strong> This payment method doesn't have a test-mode and needs to be manually enabled by the Mollie Support team based on the API Key.]]></comment>
        </field>
        <field id="title" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Title</label>
            <config_path>payment/mollie_methods_expresscomponents/title</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="payment_description" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Description</label>
            <config_path>payment/mollie_methods_expresscomponents/payment_description</config_path>
            <comment model="Mollie\Payment\Model\Adminhtml\Comment\AvailableDescriptionVariables"/>
            <depends>
                <field id="method">payment</field>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="capture_mode" translate="label comment" type="select" sortOrder="40" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>Capture method</label>
            <config_path>payment/mollie_methods_expresscomponents/capture_mode</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\CaptureMode</source_model>
            <frontend_model>Mollie\Payment\Block\Adminhtml\System\Config\Form\Field\LockCaptureMode</frontend_model>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="days_before_expire" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Days to expire</label>
            <frontend_class>validate-digits-range digits-range-1-365</frontend_class>
            <config_path>payment/mollie_methods_expresscomponents/days_before_expire</config_path>
            <depends>
                <field id="active">1</field>
                <field id="method">order</field>
            </depends>
            <comment>How many days before orders for this method becomes expired? Leave empty to use default expiration
                (28 days)
            </comment>
        </field>
        <field id="allowspecific" translate="label" type="allowspecific" sortOrder="60" showInDefault="1"
               showInWebsite="1" showInStore="1">
            <label>Payment from Applicable Countries</label>
            <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
            <config_path>payment/mollie_methods_expresscomponents/allowspecific</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="specificcountry" translate="label" type="multiselect" sortOrder="70" showInDefault="1"
               showInWebsite="1" showInStore="1">
            <label>Payment from Specific Countries</label>
            <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
            <can_be_empty>1</can_be_empty>
            <config_path>payment/mollie_methods_expresscomponents/specificcountry</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="min_order_total" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Minimum Order Total</label>
            <config_path>payment/mollie_methods_expresscomponents/min_order_total</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="max_order_total" translate="label" type="text" sortOrder="90" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Maximum Order Total</label>
            <config_path>payment/mollie_methods_expresscomponents/max_order_total</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Sort Order</label>
            <frontend_class>validate-number</frontend_class>
            <config_path>payment/mollie_methods_expresscomponents/sort_order</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
    </group>
</include>
