<?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_applepay" translate="label" type="text" sortOrder="20" showInDefault="1"
           showInWebsite="1" showInStore="1">
        <frontend_model>Mollie\Payment\Block\Adminhtml\System\Config\GroupFrontendModel</frontend_model>

        <label>Apple Pay</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_applepay/active</config_path>
            <comment>
                <![CDATA[<strong>Please note:</strong> This payment method is only visible when the user's device has Apple Pay enabled and the checkout is served over HTTPS.]]></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_applepay/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_applepay/payment_description</config_path>
            <comment model="Mollie\Payment\Model\Adminhtml\Comment\AvailableDescriptionVariables"/>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="integration_type" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Integration type</label>
            <config_path>payment/mollie_methods_applepay/integration_type</config_path>
            <comment><![CDATA[What kind of integration should be used?<br><br>
            <strong>External</strong>: The user is redirected to a Mollie page. No extra configuration required.<br>
            <strong>Direct</strong>: The user can use Apple Pay directly from your checkout, product page, minicart and shopping cart page.
            ]]></comment>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\ApplePayIntegrationType</source_model>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="apple_buy_now_heading" translate="label comment" type="text" sortOrder="50" showInDefault="1"
               showInWebsite="0" showInStore="0">
            <label>Apple Pay Direct</label>
            <frontend_model>Mollie\Payment\Block\Adminhtml\Render\Heading</frontend_model>
            <comment><![CDATA[Activating this option allows you to place the Apple Pay button directly on the product detail pages for a faster checkout. ]]></comment>
            <depends>
                <field id="integration_type">direct</field>
            </depends>
        </field>
        <field id="enable_buy_now_button" translate="label" type="select" sortOrder="60" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Enable Button on Product Page</label>
            <config_path>payment/mollie_methods_applepay/enable_buy_now_button</config_path>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
            </depends>
            <comment>
                <![CDATA[Shows the Apple Pay button directly on the product detail page for a quick checkout.]]></comment>
        </field>
        <field id="buy_now_button_color" translate="label" type="select" sortOrder="70" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Buy Now Button Style</label>
            <config_path>payment/mollie_methods_applepay/buy_now_button_color</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\ApplePayButtonColor</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
                <field id="enable_buy_now_button">1</field>
            </depends>
            <comment>
                <![CDATA[<strong>Black</strong><br>Best used on light-colored backgrounds that provide sufficient contrast.<br><br><strong>White</strong><br>Best used on dark or colored backgrounds that provide sufficient contrast.<br><br><strong>White with Outline</strong><br>Use this on white or light-colored backgrounds that don’t provide sufficient contrast. Do not use with dark or saturated backgrounds.]]></comment>
        </field>
        <field id="buy_now_button_text" translate="label" type="select" sortOrder="80" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Buy Now Button Type</label>
            <config_path>payment/mollie_methods_applepay/buy_now_button_text</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\ApplePayButtonText</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
                <field id="enable_buy_now_button">1</field>
            </depends>
            <comment>
                <![CDATA[Apple provides different styles of buttons to match your customer experience.]]></comment>
        </field>
        <field id="enable_minicart_button" translate="label" type="select" sortOrder="90" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Enable Button in minicart</label>
            <config_path>payment/mollie_methods_applepay/enable_minicart_button</config_path>
            <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
            </depends>
            <comment>
                <![CDATA[Shows the Apple Pay button in the minicart for a quick checkout.]]></comment>
        </field>
        <field id="minicart_button_color" translate="label" type="select" sortOrder="100" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Minicart Button Style</label>
            <config_path>payment/mollie_methods_applepay/minicart_button_color</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\ApplePayButtonColor</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
                <field id="enable_minicart_button">1</field>
            </depends>
            <comment>
                <![CDATA[<strong>Black</strong><br>Best used on light-colored backgrounds that provide sufficient contrast.<br><br><strong>White</strong><br>Best used on dark or colored backgrounds that provide sufficient contrast.<br><br><strong>White with Outline</strong><br>Use this on white or light-colored backgrounds that don’t provide sufficient contrast. Do not use with dark or saturated backgrounds.]]></comment>
        </field>
        <field id="minicart_button_text" translate="label" type="select" sortOrder="110" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Minicart Button Type</label>
            <config_path>payment/mollie_methods_applepay/minicart_button_text</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\ApplePayButtonText</source_model>
            <depends>
                <field id="active">1</field>
                <field id="integration_type">direct</field>
                <field id="enable_minicart_button">1</field>
            </depends>
            <comment>
                <![CDATA[Apple provides different styles of buttons to match your customer experience.]]></comment>
        </field>
        <field id="capture_mode" translate="label comment" type="select" sortOrder="120" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>Capture method</label>
            <config_path>payment/mollie_methods_applepay/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="capture_expiration_window" translate="label comment" type="text" sortOrder="130" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>Capture expiration window</label>
            <frontend_model>Mollie\Payment\Block\Adminhtml\System\Config\Form\Field\CaptureExpirationWindow</frontend_model>
            <depends>
                <field id="active">1</field>
                <field id="capture_mode">manual</field>
            </depends>
        </field>
        <field id="when_to_capture" translate="label comment" type="select" sortOrder="140" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>When to capture?</label>
            <config_path>payment/mollie_methods_applepay/when_to_capture</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\CaptureMoment</source_model>
            <depends>
                <field id="active">1</field>
                <field id="capture_mode">manual</field>
            </depends>
        </field>
        <field id="capture_delay" translate="label comment" type="text" sortOrder="145" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>Capture delay</label>
            <config_path>payment/mollie_methods_applepay/capture_delay</config_path>
            <frontend_class>validate-digits</frontend_class>
            <depends>
                <field id="active">1</field>
                <field id="capture_mode">automatic</field>
            </depends>
        </field>
        <field id="capture_delay_unit" translate="label" type="select" sortOrder="147" showInDefault="1"
               showInWebsite="1" showInStore="1" canRestore="1">
            <label>Capture delay unit</label>
            <config_path>payment/mollie_methods_applepay/capture_delay_unit</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\CaptureDelayUnit</source_model>
            <depends>
                <field id="active">1</field>
                <field id="capture_mode">automatic</field>
            </depends>
        </field>
        <field id="allowspecific" translate="label" type="allowspecific" sortOrder="150" 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_applepay/allowspecific</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="specificcountry" translate="label" type="multiselect" sortOrder="160" 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_applepay/specificcountry</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="min_order_total" translate="label" type="text" sortOrder="170" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Minimum Order Total</label>
            <config_path>payment/mollie_methods_applepay/min_order_total</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="max_order_total" translate="label" type="text" sortOrder="180" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Maximum Order Total</label>
            <config_path>payment/mollie_methods_applepay/max_order_total</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="payment_surcharge_type" translate="label" type="select" sortOrder="190" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Payment Surcharge</label>
            <config_path>payment/mollie_methods_applepay/payment_surcharge_type</config_path>
            <source_model>Mollie\Payment\Model\Adminhtml\Source\PaymentFeeType</source_model>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
        <field id="payment_surcharge_fixed_amount" translate="label" type="text" sortOrder="200" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Payment Surcharge fixed amount</label>
            <config_path>payment/mollie_methods_applepay/payment_surcharge_fixed_amount</config_path>
            <backend_model>Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee</backend_model>
            <frontend_class>validate-not-negative-number</frontend_class>
            <depends>
                <field id="active">1</field>
                <field id="payment_surcharge_type" separator=",">fixed_fee,fixed_fee_and_percentage</field>
            </depends>
        </field>
        <field id="payment_surcharge_percentage" translate="label" type="text" sortOrder="210" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Payment Surcharge percentage</label>
            <config_path>payment/mollie_methods_applepay/payment_surcharge_percentage</config_path>
            <backend_model>Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee</backend_model>
            <frontend_class>validate-number-range number-range-0-10</frontend_class>
            <depends>
                <field id="active">1</field>
                <field id="payment_surcharge_type" separator=",">percentage,fixed_fee_and_percentage</field>
            </depends>
        </field>
        <field id="payment_surcharge_limit" translate="label" type="text" sortOrder="220" showInDefault="1"
               showInWebsite="1"
               showInStore="1">
            <label>Payment Surcharge limit</label>
            <config_path>payment/mollie_methods_applepay/payment_surcharge_limit</config_path>
            <comment>
                <![CDATA[Enter the maximum amount of payment surcharge that should be charged to the customer.]]></comment>
            <backend_model>Mollie\Payment\Model\Adminhtml\Backend\VerifiyPaymentFee</backend_model>
            <frontend_class>validate-not-negative-number</frontend_class>
            <depends>
                <field id="active">1</field>
                <field id="payment_surcharge_type" separator=",">percentage,fixed_fee_and_percentage</field>
            </depends>
        </field>
        <field id="payment_surcharge_tax_class" translate="label" type="select" sortOrder="230" showInDefault="1"
               showInWebsite="1" showInStore="1">
            <label>Payment Surcharge Tax Class</label>
            <config_path>payment/mollie_methods_applepay/payment_surcharge_tax_class</config_path>
            <source_model>\Magento\Tax\Model\TaxClass\Source\Product</source_model>
            <depends>
                <field id="active">1</field>
                <field id="payment_surcharge_type" separator=",">fixed_fee,percentage,fixed_fee_and_percentage</field>
            </depends>
        </field>
        <field id="sort_order" translate="label" type="text" sortOrder="240" showInDefault="1" showInWebsite="1"
               showInStore="1">
            <label>Sort Order</label>
            <frontend_class>validate-number</frontend_class>
            <config_path>payment/mollie_methods_applepay/sort_order</config_path>
            <depends>
                <field id="active">1</field>
            </depends>
        </field>
    </group>
</include>
