{*
* 2007-2022 ETS-Soft
*
* NOTICE OF LICENSE
*
* This file is not open source! Each license that you purchased is only available for 1 wesite only.
* If you want to use this file on more websites (or projects), you need to purchase additional licenses.
* You are not allowed to redistribute, resell, lease, license, sub-license or offer our resources to any third party.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs, please contact us for extra customization service at an affordable price
*
*  @author ETS-Soft <etssoft.jsc@gmail.com>
*  @copyright  2007-2022 ETS-Soft
*  @license    Valid for 1 website (or project) for each purchase of license
*  International Registered Trademark & Property of ETS-Soft
*}
<script type="text/javascript">
    var ets_hd_change_status_msg = '{l s='Do you want to change status?' mod='ets_helpdesk'}';
    var ets_hd_change_priority_msg = '{l s='Do you want to change priority?' mod='ets_helpdesk'}';
    var ets_hd_not_item_selected = '{l s='Please choose item' mod='ets_helpdesk'}';
    var ets_hd_delete_confirm = '{l s='Do you want to delete?' mod='ets_helpdesk'}';
    var ets_hd_max_file_size_msg = '{l s='Max file size' mod='ets_helpdesk'}';
    var ets_hd_allow_ext_file_msg = '{l s='File extension is invalid' mod='ets_helpdesk'}';
    var ets_hd_maximum_character = '{l s='Maximum character %d' mod='ets_helpdesk'}';

    {if isset($ETS_HD_PROCESS_LINK)}
        var ETS_HD_PROCESS_LINK = '{$ETS_HD_PROCESS_LINK nofilter}';
    {/if}
    {if isset($PS_ALLOW_ACCENTED_CHARS_URL)}
        var PS_ALLOW_ACCENTED_CHARS_URL = {$PS_ALLOW_ACCENTED_CHARS_URL|intval};{/if}
    {if isset($ETS_HD_CURRENT_LINK)}
        var ETS_HD_CURRENT_INDEX = '{$ETS_HD_CURRENT_LINK nofilter}';
    {/if}
    {if $is_back_office}
        var ETS_HD_DELETE_TITLE = '{l s='Delete' mod='ets_helpdesk'}';
    {/if}
    {if isset($post_max_size) && $post_max_size}
        var ets_hd_post_max_size = {$post_max_size|intval};
    {/if}
    {if isset($allow_ext_files) && $allow_ext_files}
        var ets_hd_allow_ext_files = [{foreach from=$allow_ext_files item='ext_file'}'{$ext_file|escape:'html':'UTF-8'}',{/foreach}];
    {/if}
    {if isset($allow_ext_files) && $allow_ext_files}
        var ets_hd_allow_ext_image_files = [{foreach from=$allow_ext_files item='ext_file'}'{$ext_file|escape:'html':'UTF-8'}',{/foreach}];
    {/if}
    {if isset($configs) && $configs && is_array($configs_ticket) && $configs_ticket}
        {foreach from=$configs key='key' item='config'}
            {if isset($configs_ticket.$key)}
                var {$key|escape:'html':'UTF-8'} = {if $config.js !== 'string'}{$configs_ticket.$key|intval};{else}'{$configs_ticket.$key|escape:'html':'UTF-8'}';{/if}
            {/if}
        {/foreach}
    {/if}
</script>
{if isset($captcha_enabled) && $captcha_enabled > 0 && isset($configs_ticket) && $configs_ticket}
    <script src="https://www.google.com/recaptcha/api.js?hl={$language_code|escape:'html':'UTF-8'}{if $configs_ticket.ETS_HD_CAPTCHA_TYPE != 'recaptcha_v2'}&render={$configs_ticket.ETS_HD_RECAPTCHA_V3_SITE_KEY|escape:'html':'UTF-8'}{else}&onload=ets_hd_g_recaptcha_load&render=explicit{/if}" async defer></script>
    {if $configs_ticket.ETS_HD_CAPTCHA_TYPE == 'recaptcha_v2'}<script type="text/javascript">
        var ets_hd_g_recaptcha_load = function () {
            ets_hd_fn_recaptcha.onLoad(document.getElementsByClassName('form-g-recaptcha'));
        }
        var ets_hd_g_recaptcha = function () {
            ets_hd_fn_recaptcha.ets_hd_recaptcha_valid = true;
            $('.g-recaptcha.error').removeClass('error');
        }
    </script>{/if}
{/if}
{if isset($ets_hd_link_create_ticket_as_customer) && $ets_hd_link_create_ticket_as_customer}
    <script type="text/javascript">
        var ets_hd_link_create_ticket_as_customer = '{$ets_hd_link_create_ticket_as_customer|escape:'html':'UTF-8'}';
        var Create_ticket_text = '{l s='Create ticket' mod='ets_helpdesk'}';
    </script>
{/if}