<?xml version="1.0"?>

<!--
/**
 * Tawk.to
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to support@tawk.to so we can send you a copy immediately.
 *
 * @copyright   Copyright (c) 2016 Tawk.to
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="tawk_widget" translate="label" sortOrder="960" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Tawk.to Widget</label>
            <tab>autogedal</tab>
            <resource>Magento_Config::config</resource>
            <group id="general" translate="label comment" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>General</label>
                <comment>The widget block remains rendered in the footer container. These settings control when the external script is injected.</comment>

                <field id="enabled" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable Widget</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Turn off the storefront widget without disabling the module.</comment>
                </field>

                <field id="load_delay_ms" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    <label>Load Delay (ms)</label>
                    <validate>validate-digits</validate>
                    <comment>Delay before loading the widget after window load. Example: 30000.</comment>
                </field>

                <field id="force_show_widget" translate="label comment" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Force Show Widget on Load</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <comment>Calls the Tawk API showWidget() hook after initialization.</comment>
                </field>
            </group>
        </section>
    </system>
</config>
