<?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>
        <tab id="bloyal" translate="label" sortOrder="10">
            <label>Bloyal</label>
        </tab>
        <section id="settings" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
            <class>separator-top</class>
            <label>Settings</label>
            <tab>bloyal</tab>
            <resource>Bloyal_Calculatecart::config</resource>
            <group id="module_version" translate="label" type="text" sortOrder="5" showInWebsite="1" showInStore="0"
                   showInDefault="1">
                <label>bLoyal Connector Information</label>
                <field id="message" translate="label" type="label" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <!-- <label>Current Version</label> -->
                <frontend_model>Bloyal\Calculatecart\Block\System\Config\Message</frontend_model>
                </field>
                <field id="version" translate="label" type="label" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Current Version</label>
                <backend_model>Bloyal\Calculatecart\Model\Config\Version</backend_model>
                </field>
				<field id="device_code" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Device Code</label>
                <backend_model>Bloyal\Calculatecart\Model\Config\DeviceCode</backend_model>
                </field>
				<field id="device_name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Device Name</label>
                <backend_model>Bloyal\Calculatecart\Model\Config\DeviceName</backend_model>
                </field>
				<field id="store_code" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Store Code</label>
                <backend_model>Bloyal\Calculatecart\Model\Config\StoreCode</backend_model>
                </field>
				<field id="store_name" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Store Name</label>
                <backend_model>Bloyal\Calculatecart\Model\Config\StoreName</backend_model>
                </field>
                <field id="provisioning_button" translate="label" type="button" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
                    <frontend_model>Bloyal\Calculatecart\Block\System\Config\ProvisioningButton</frontend_model>
                </field>
            </group>
			<group id="cart_summary" translate="label" sortOrder="25" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Cart Summary</label>
                <field id="status" translate="label" type="select" showInDefault="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
            <group id="tender_mapping" translate="label" type="text" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Payment Tender Mappings</label>
                <field id="loyaltydollar" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Loyalty Dollar</label>
                </field>
                <field id="giftcard" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Gift Card</label>
                </field>
            </group>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>General Configuration</label>
                <field id="domain_name" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Company Domain Name</label>
                    <validate>required-entry</validate>
                </field>
                <field id="domain_key" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Device API Key</label>
                    <validate>required-entry</validate>
                </field>
                <field id="button_id" translate="label" type="button" sortOrder="25" showInDefault="1" showInWebsite="1" showInStore="1">
                    <frontend_model>Bloyal\Calculatecart\Block\System\Config\Button</frontend_model>
                </field>
            </group>
            <group id="api_url_settings" translate="label" sortOrder="500" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Advanced Settings</label>
                <field id="access_key" translate="label" type="password" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Access Key</label>
                    <validate>required-entry</validate>
                </field>
                <field id="bloyal_domain_url" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Custom Domain URL</label>
                </field>
                <field id="bloyal_grid_url" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Grid Api URL</label>
                </field>
                <field id="bloyal_loyalty_url" translate="label" type="text" sortOrder="15" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Loyalty Engine Api URL</label>
                </field>
                <field id="bloyal_order_url" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Order Engine Api URL</label>
                </field>
                <field id="bloyal_payment_url" translate="label" type="text" sortOrder="25" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Payment Api URL</label>
                </field>
                <field id="bloyal_logger_url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Logger Api URL</label>
                </field>
            </group>            
            <group id="catalog_pricing" translate="label" type="text" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Magento Catalog Pricing Settings</label>
                <field id="rule" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Pricing Treat As </label>
                    <source_model>Bloyal\Calculatecart\Model\Config\Source\CatalogPricingForBloyal</source_model>
                </field>
            </group>
            <group id="log_settings" translate="label" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>Log Settings</label>
                <field id="enable_log" translate="label" type="select" showInDefault="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment model="Bloyal\Calculatecart\Model\BloyalLog" />
                </field>
            </group>			
        </section>
		<section id="payment">
			<resource>Bloyal_Calculatecart::payment</resource>
            <group id="giftcard" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>bLoyal Gift Card</label>
                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Enabled</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Title</label>
                </field>
                <field id="order_status" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>New Order Status</label>
                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\NewStatus</source_model>
                </field>
                <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Payment from Applicable Countries</label>
                    <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
                </field>
                <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Payment from Specific Countries</label>
                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                    <can_be_empty>1</can_be_empty>
                </field>
                <field id="instructions" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Instructions</label>
                </field>
                <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Minimum Order Total</label>
                </field>
                <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Maximum Order Total</label>
                </field>
                <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Sort Order</label>
                </field>
            </group>
			<group id="loyaltydollar" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>bLoyal Loyalty Tender</label>
                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Enabled</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Title</label>
                </field>
                <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Payment from Applicable Countries</label>
                    <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
                </field>
                <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Payment from Specific Countries</label>
                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
                    <can_be_empty>1</can_be_empty>
                </field>
                <field id="instructions" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Instructions</label>
                </field>
                <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Minimum Order Total</label>
                </field>
                <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Maximum Order Total</label>
                </field>
                <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Sort Order</label>
                </field>
            </group> 
        </section>
    </system>
</config>