<?xml version="1.0"?>
<!--
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_DeliveryTime
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="mpdeliverytime" translate="label comment" sortOrder="50" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Delivery Time</label>
            <tab>mageplaza</tab>
            <resource>Mageplaza_DeliveryTime::configuration</resource>
            <group id="general" translate="label comment" sortOrder="10" type="text" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General Configuration</label>
                <field id="enabled" translate="label comment" sortOrder="10" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Enable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment><![CDATA[Select <strong>Yes</strong> to enable the module.]]></comment>
                </field>
                <field id="is_enabled_house_security_code" translate="label comment" sortOrder="20" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Enable House Security Code</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment><![CDATA[Select <strong>Yes</strong> to allow customers to fill their house security codes.]]></comment>
                </field>
                <field id="is_enabled_delivery_comment" translate="label comment" sortOrder="40" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Enable Delivery Comment</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment><![CDATA[Select <strong>Yes</strong> to allow customers to commend on their orders.]]></comment>
                </field>
                <field id="is_enabled_delivery_time" translate="label comment" sortOrder="40" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Enable Delivery Time</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment><![CDATA[Select <strong>Yes</strong> to allow customers to choose estimated delivery time.]]></comment>
                </field>
                <field id="delivery_time" translate="label comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Delivery Time</label>
                    <frontend_model>Mageplaza\DeliveryTime\Block\Adminhtml\Config\Backend\DeliveryTime</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                    <comment>Allows admins to choose the time frame for delivery</comment>
                    <depends>
                        <field id="is_enabled_delivery_time">1</field>
                    </depends>
                </field>
                <field id="date_format" translate="label comment" sortOrder="60" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Date Format</label>
                    <source_model>Mageplaza\DeliveryTime\Model\System\Config\Source\DeliveryTime</source_model>
                    <comment>Select the date format used for delivery date.</comment>
                </field>
                <field id="days_off" translate="label comment" type="multiselect" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Day Off</label>
                    <source_model>Magento\Config\Model\Config\Source\Locale\Weekdays</source_model>
                    <can_be_empty>1</can_be_empty>
                    <comment>Allows admins to choose the day off in week. Customers can not select the days off for delivery</comment>
                </field>
                <field id="date_off" translate="label comment" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Date Off</label>
                    <frontend_model>Mageplaza\DeliveryTime\Block\Adminhtml\Config\Backend\DateOff</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
                    <comment>Allows admins to choose any date off that they want. Customers can not select the days off for delivery</comment>
                </field>
            </group>
        </section>
    </system>
</config>
