<?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>Messages</label> -->
                    <frontend_model>Bloyal\Calculatecart\Block\System\Config\Message</frontend_model>
                </field>
                <field id="provisioning_msg" translate="label" type="label" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <!-- <label>Messages</label> -->
                    <frontend_model>Bloyal\Calculatecart\Block\System\Config\ProvisioningMessage</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="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>
                 <field id="expanded_by_default" translate="label" type="select" showInDefault="1">
                    <label>Expanded by default:</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </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>
                </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="apply_full_balance" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Apply Full Balance</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="apply_in_increments_of" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Apply in increments of</label>
                </field>
                 <field id="giftcard_mapping" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Gift Card Tender</label>
                </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="loyaltydollar_mapping" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Loyalty Tender</label>
                </field>
                <field id="apply_full_balance" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>Apply Full Balance</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="apply_in_increments_of" translate="label" type="text" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Apply in increments of</label>
                </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>
            <!-- we remove storepay group id code from here 11/8/2023 -->
            <group id="storedpayment" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>bLoyal Stored Payment</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="storedpayment_mapping" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    <label>Stored Payment</label>
                </field>
                <field id="title" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Title</label>
                </field>
                <field id="description" translate="label" type="textarea" sortOrder="62" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Description</label>
                </field>
                <field id="storedpayment_snippets" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0" canRestore="1">
                    <label>bLoyal Stored Payment Snippets</label>
                    <source_model>Bloyal\Calculatecart\Model\Config\StoredPaymentSnippets</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>
        </section>
        <section id="order_configuration" translate="label" sortOrder="131" showInDefault="1" showInWebsite="1" showInStore="1">
           <class>separator-top</class>
           <label>Order Processing Configuration</label>
           <tab>bloyal</tab>
           <resource>Order_Configuration::config</resource>
            <group id="orderengineSettings" translate="label" sortOrder="20" showInDefault="1" showInWebsite="1">
               <label> bLoyal Order Processing Configuration </label>
               <field id="orderengine_settings" translate="label comment" type="select" sortOrder="25" showInDefault="1"  showInWebsite="1">
                   <label>Enable</label>
                  <frontend_model>Bloyal\Calculatecart\Block\Adminhtml\System\Config\Field\OrderConfig</frontend_model>
                  
               </field>
               <field id="bLoyal_Order_Engine" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Use bLoyal Order Engine</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="bLoyal_Applied_Shipping_Charges" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>bLoyal Applied Shipping Charges</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="bLoyal_Applied_Taxes" translate="label" type="select" sortOrder="21" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>bLoyal Applied Taxes</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
           </group>
       </section>
        <section id="carriers" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="1000" translate="label">
            <group id="bloyalshipping" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label">
                <label>Custom Shipping Method Group</label>
                <field id="active" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="10" translate="label" type="select">
                    <label>Enabled</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>
        </section>
		<!-- we remove carriers id code from here 11/8/2023 -->
    </system>
</config>