<?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="darsh" translate="label" sortOrder="100">
            <label>Darsh Call For Price</label>
        </tab>
        <section id="callforprice" showInDefault="1" sortOrder="1" showInWebsite="1" showInStore="1">
            <tab>darsh</tab>
             <label>Call For Price</label>
             <resource>Darsh_Callforprice::callprice</resource>
             <group id="call_for_price" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="enable" type="select" showInDefault="1" sortOrder="10" showInWebsite="1" showInStore="1">
                    <label>Call For Price</label>
                    <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
                </field>
                 <field id="call_for_price_button_text" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Call For Price Button Text</label>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>This is the text to be displayed in the Call For Price button</comment>
                </field>
                <field id="send_email_to" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Send Email To</label>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>The email address to which the price request email will be sent</comment>
                </field>
                <field id="email_sender" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Email Sender</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Identity</source_model>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>Email Sender</comment>
                </field>
                 <field id="email_template_customer" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Email Template For Customer</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>Choose Email Template</comment>
                </field>
                <field id="email_template_admin" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Email Template For Admin</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>Choose Email Template</comment>
                </field>
                <field id="email_template_status"  type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Email Template Status Update</label>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>Choose Email Template</comment>
                </field>
                <field id="customer_groups" type="multiselect" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Customer Groups</label>
                    <source_model>Magento\Customer\Model\Config\Source\Group</source_model>
                     <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>customer groups to which the Call For Price functionality will be applied</comment>
                </field> 
                <field id="specific_date_range" type="select" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1" >
                    <label>Show on Specific Date Range</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <depends>
                        <field id="callforprice/call_for_price/enable">1</field>
                    </depends>
                    <comment>If set to yes, the Call For Price Buttons will only be available in the front-end
                        during a particular date range. If set to No, the functionality will always be
                        available.
                    </comment>
                </field>
                <field id="from_date" type="date" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>From Date</label>
                    <depends>
                        <field id="callforprice/call_for_price/specific_date_range">1</field>
                    </depends>
                    <frontend_model>Darsh\Callforprice\Block\Adminhtml\System\Config\Date</frontend_model>
                </field>
                <field id="to_date" type="date" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>To Date</label>
                    <depends>
                        <field id="callforprice/call_for_price/specific_date_range">1</field>
                    </depends>
                    <frontend_model>Darsh\Callforprice\Block\Adminhtml\System\Config\Date</frontend_model>
                </field>
            </group>
         </section>
    </system>
</config>