<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* @UVDeskCoreFramework/Snippets/createMemberTicket.html.twig */
class __TwigTemplate_27e6a13935433e63093acbe4ecef680c extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@UVDeskCoreFramework/Snippets/createMemberTicket.html.twig"));

        // line 1
        yield "<style>
    .mce-path {
      \t\tdisplay: none !important;
\t}
    .is-invalid {
        border-color: #FF5656;
    }
    .error-message {
        color:  #FF5656; /* Text color for error messages */
        display: none; /* Hide by default */
        font-style: italic;
        font-size: 15px;
    }
        .my-link {
    color: #3498db;         /* Link color */
    text-decoration: none;  /* No underline by default */
    font-size: 16px;        /* Adjust the font size */
    margin-left: 400px;
    margin-bottom: 10px !important;
    font-weight: bold;      /* Make the text bold */
    padding: 5px 10px;      /* Optional padding */
    border: 1px solid transparent; /* Optional border for button-like effect */
    border-radius: 4px;     /* Rounded corners */
    transition: color 0.3s, border-color 0.3s;
}

.my-link:hover {
    text-decoration: underline; /* Underline on hover */
    color: #2c3e50;             /* Darker color on hover */
    border-color: #3498db;       /* Optional border highlight */
    background-color:beige;
</style>
";
        // line 33
        $context["isTicketViewPage"] = ("helpdesk_member_ticket" == CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 33), "attributes", [], "any", false, false, false, 33), "get", ["_route"], "method", false, false, false, 33));
        // line 34
        yield "
<div class=\"uv-pop-up-overlay uv-no-error-success-icon\" id=\"create-ticket-modal\">
    <div class=\"uv-pop-up-box uv-pop-up-wide\">
        <span class=\"uv-pop-up-close\"></span>
        <h2>Create Ticket</h2>
        <form action=\"";
        // line 39
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_create_ticket");
        yield "\" method=\"post\" id=\"create-ticket-form\" enctype=\"multipart/form-data\">
            ";
        // line 41
        yield "            ";
        if ( !($context["isTicketViewPage"] ?? null)) {
            // line 42
            yield "                ";
            // line 43
            yield "                <div class=\"uv-element-block\" id=\"Name-div\">
                    <label class=\"uv-field-label\">";
            // line 44
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "html", null, true);
            yield "</label>
                    <div class=\"uv-field-block\">
                        <input name=\"name\" class=\"uv-field create-ticket\" id=\"GetName\" type=\"text\" value=\"\" onfocus=\"fetchNames()\" onkeyup=\"fetchNames()\" autocomplete=\"off\">
<div id=\"nameSuggestions\" class=\"suggestions-box\" style=\"display: none;\"\"></div>
                    </div>
                    <span class=\"uv-field-info\">";
            // line 49
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer full name"), "html", null, true);
            yield "</span>
<span><a href=\"";
            // line 50
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["customerCreateUrl"] ?? null), "html", null, true);
            yield "\" class=\"my-link\" target=\"_blank\"  rel=\"noopener noreferrer\" style=\"margin-bottom: 10px !important\">Click to create customer</a></span>
                </div>

                ";
            // line 54
            yield "                <div class=\"uv-element-block\" id=\"email-div\">
                    <label class=\"uv-field-label\">";
            // line 55
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html", null, true);
            yield "</label>
                    <div class=\"uv-field-block\">
                        <input name=\"from\" class=\"uv-field create-ticket\" type=\"text\" id=\"email-input\" onfocus=\"fetchEmails()\" onkeyup=\"fetchEmails()\" autocomplete=\"off\">
                        <div id=\"email-suggestions\" class=\"suggestions-box\" style=\"display: none;\"></div>
                    </div>
                    <span class=\"uv-field-info\">";
            // line 60
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer email address"), "html", null, true);
            yield "</span>
                </div>
            ";
        } else {
            // line 63
            yield "                ";
            // line 64
            yield "                <span class=\"uv-field-info\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket will be created with current ticket's customer"), "html", null, true);
            yield "</span>
            ";
        }
        // line 66
        yield "
            ";
        // line 68
        yield "            <div class=\"uv-element-block\">
            \t<label class=\"uv-field-label required\">";
        // line 69
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type"), "html", null, true);
        yield "</label>
            \t<div class=\"uv-field-block\">
            \t\t<select name=\"type\" class=\"uv-select create-ticket\" id=\"type\">
            \t\t\t<option value=\"\">";
        // line 72
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select type"), "html", null, true);
        yield "</option>
            
            \t\t\t";
        // line 74
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, ($context["ticket_service"] ?? null), "getTypes", [[1, 2]], "method", false, false, false, 74));
        foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
            yield " ";
            // line 75
            yield "            \t\t\t\t<option value=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 75), "html", null, true);
            yield "\" ";
            yield (((CoreExtension::getAttribute($this->env, $this->source, ($context["post"] ?? null), "type", [], "any", true, true, false, 75) && (CoreExtension::getAttribute($this->env, $this->source, ($context["post"] ?? null), "type", [], "any", false, false, false, 75) == CoreExtension::getAttribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 75)))) ? ("selected") : (""));
            yield ">
            \t\t\t\t\t";
            // line 76
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["type"], "name", [], "any", false, false, false, 76), "html", null, true);
            yield "
            \t\t\t\t</option>
            \t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['type'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 79
        yield "            \t\t</select>
            \t</div>
            \t<span class=\"uv-field-info\">";
        // line 81
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Choose ticket type"), "html", null, true);
        yield "</span>
            </div>

            ";
        // line 85
        yield "            <div class=\"uv-element-block\">
                <label class=\"uv-field-label\">";
        // line 86
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Subject"), "html", null, true);
        yield "</label>
                <div class=\"uv-field-block\">
                    <input name=\"subject\" class=\"uv-field create-ticket\" type=\"text\" value=\"\">
                </div>

                <span class=\"uv-field-info\">";
        // line 91
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket subject"), "html", null, true);
        yield "</span>
            </div>

            ";
        // line 95
        yield "            <div class=\"uv-element-block\">
                <label class=\"uv-field-label\">";
        // line 96
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Message"), "html", null, true);
        yield "</label>
                <div class=\"uv-field-block\">
                    <textarea name=\"reply\" id=\"create-reply\" class=\"uv-field create-ticket\" type=\"text\">";
        // line 98
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["ticket_service"] ?? null), "getAgentDraftReply", [], "method", false, false, false, 98), "html", null, true);
        yield "</textarea>
                </div>
                
                <span class=\"uv-field-info\">";
        // line 101
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket query message"), "html", null, true);
        yield "</span>
            </div>

            ";
        // line 105
        yield "            <div class=\"uv-element-block attachment-block uv-no-error-success-icon\" id=\"uv-attachment-option\">
                <label>
                    <span class=\"uv-file-label\">";
        // line 107
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Attachment"), "html", null, true);
        yield "</span>
                </label>
            </div>

            ";
        // line 112
        yield "            ";
        $context["removeMe"] = [];
        // line 113
        yield "            ";
        if (($context["headerCustomFields"] ?? null)) {
            // line 114
            yield "                <div class=\"custom-fields clearfix\">
                    ";
            // line 115
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["headerCustomFields"] ?? null));
            foreach ($context['_seq'] as $context["key"] => $context["customField"]) {
                // line 116
                yield "                        <div class=\"uv-element-block input-group ";
                yield ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 116))) ? ("dependent") : (""));
                yield " ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 116));
                foreach ($context['_seq'] as $context["_key"] => $context["customFieldCustomFieldsDependency"]) {
                    yield " dependency";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldCustomFieldsDependency"], "id", [], "any", false, false, false, 116), "html", null, true);
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_key'], $context['customFieldCustomFieldsDependency'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                yield "\" style=\"position: relative; ";
                yield ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldsDependency", [], "any", false, false, false, 116))) ? ("display: none;") : (""));
                yield "\">
                            <label class=\"uv-field-label\" for=\"for";
                // line 117
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 117) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 117)), "html", null, true);
                yield "\">";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 117), "html", null, true);
                yield "</label>
                            ";
                // line 118
                if ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 118) == "text")) {
                    // line 119
                    yield "                                <div class=\"uv-field-block\">
                                    <input type=\"";
                    // line 120
                    ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 120), "fieldtype", [], "array", true, true, false, 120)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_0 = (($__internal_compile_1 = $context["customField"]) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1["validation"] ?? null) : null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0["fieldtype"] ?? null) : null), "html", null, true)) : (yield "text"));
                    yield "\" name=\"customFields[";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 120), "html", null, true);
                    yield "]\" class=\"uv-field create-ticket\" value=\"\" ";
                    yield ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 120)) ? ("required") : (""));
                    yield " id=\"for";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 120) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 120)), "html", null, true);
                    yield "\" placeholder=\"";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "placeholder", [], "any", false, false, false, 120), "html", null, true);
                    yield "\">
                                    <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                </div>

                            ";
                } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source,                 // line 124
$context["customField"], "fieldType", [], "any", false, false, false, 124), ["date", "time", "datetime"])) {
                    // line 125
                    yield "                                <div class=\"uv-field-block\">
                                    <input class=\"uv-field form-control create-ticket uv-date-picker ";
                    // line 126
                    if ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 126) == "time")) {
                        yield "time";
                    } else {
                        yield "calendar";
                    }
                    yield " uv-header-";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "fieldType", [], "any", false, false, false, 126), "html", null, true);
                    yield "\" type=\"text\" name=\"customFields[";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 126), "html", null, true);
                    yield "]\" ";
                    yield ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 126)) ? ("required") : (""));
                    yield " id=\"for";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 126) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 126)), "html", null, true);
                    yield "\" value=\"\">
                                    <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                </div>
                            ";
                } elseif ((CoreExtension::getAttribute($this->env, $this->source,                 // line 129
$context["customField"], "fieldType", [], "any", false, false, false, 129) == "textarea")) {
                    // line 130
                    yield "                                <div class=\"uv-field-block\">
                                    <textarea name=\"customFields[";
                    // line 131
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 131), "html", null, true);
                    yield "]\" class=\"uv-field create-ticket\" ";
                    yield ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 131)) ? ("required") : (""));
                    yield " id=\"for";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 131) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 131)), "html", null, true);
                    yield "\"></textarea>
                                    <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                </div>

                            ";
                } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source,                 // line 135
$context["customField"], "fieldType", [], "any", false, false, false, 135), ["file"])) {
                    // line 136
                    yield "                                <div class=\"uv-field-block\">
                                    <input type=\"file\" name=\"customFields[";
                    // line 137
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 137), "html", null, true);
                    yield "]\" class=\"uv-field create-ticket\" ";
                    yield ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 137)) ? ("required") : (""));
                    yield " id=\"for";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 137) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 137)), "html", null, true);
                    yield "\">
                                    <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                </div>

                            ";
                } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source,                 // line 141
$context["customField"], "fieldType", [], "any", false, false, false, 141), ["select"])) {
                    // line 142
                    yield "                                ";
                    if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 142))) {
                        // line 143
                        yield "                                    <div class=\"uv-field-block\">
                                        <select name=\"customFields[";
                        // line 144
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 144), "html", null, true);
                        yield "]\" class=\"uv-select create-ticket\" id=\"for";
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 144) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 144)), "html", null, true);
                        yield "\" ";
                        yield ((CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 144)) ? ("required") : (""));
                        yield ">
                                            <option value=\"\">";
                        // line 145
                        yield "Select option";
                        yield "</option>
                                            ";
                        // line 146
                        $context['_parent'] = $context;
                        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 146));
                        foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
                            // line 147
                            yield "                                                <option value=\"";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 147), "html", null, true);
                            yield "\">";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 147), "html", null, true);
                            yield "</option>
                                            ";
                        }
                        $_parent = $context['_parent'];
                        unset($context['_seq'], $context['_key'], $context['customFieldValues'], $context['_parent']);
                        $context = array_intersect_key($context, $_parent) + $_parent;
                        // line 149
                        yield "                                        </select>
                                        <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                    </div>
                                ";
                    } else {
                        // line 153
                        yield "                                    <!--Hide this beacause choices aren't available-->
                                    ";
                        // line 154
                        $context["removeMe"] = Twig\Extension\CoreExtension::merge(($context["removeMe"] ?? null), [(("for" . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 154)) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 154))]);
                        // line 155
                        yield "                                ";
                    }
                    // line 156
                    yield "
                            ";
                } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source,                 // line 157
$context["customField"], "fieldType", [], "any", false, false, false, 157), ["checkbox"])) {
                    // line 158
                    yield "                                ";
                    if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 158))) {
                        // line 159
                        yield "                                    ";
                        $context['_parent'] = $context;
                        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 159));
                        foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
                            // line 160
                            yield "                                        <div class=\"uv-split-field\">
                                            <label>
                                                <div class=\"uv-checkbox\">
                                                    <input type=\"checkbox\" name=\"customFields[";
                            // line 163
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 163), "html", null, true);
                            yield "][]\" value=\"";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 163), "html", null, true);
                            yield "\" id=\"for";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 163) . CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 163)), "html", null, true);
                            yield "\" class=\"create-ticket\"/>
                                                    <span class=\"uv-checkbox-view\"></span>
                                                </div>
                                                <span class=\"uv-radio-label\" for=\"for";
                            // line 166
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 166) . CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 166)), "html", null, true);
                            yield "\">";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 166), "html", null, true);
                            yield "</span>
                                            </label>
                                            <span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>
                                        </div>
                                    ";
                        }
                        $_parent = $context['_parent'];
                        unset($context['_seq'], $context['_key'], $context['customFieldValues'], $context['_parent']);
                        $context = array_intersect_key($context, $_parent) + $_parent;
                        // line 171
                        yield "                                ";
                    } else {
                        // line 172
                        yield "                                    <!--Hide this beacause choices aren't available-->
                                    ";
                        // line 173
                        $context["removeMe"] = Twig\Extension\CoreExtension::merge(($context["removeMe"] ?? null), [(("for" . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 173)) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 173))]);
                        // line 174
                        yield "                                ";
                    }
                    // line 175
                    yield "
                            ";
                } elseif (CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source,                 // line 176
$context["customField"], "fieldType", [], "any", false, false, false, 176), ["radio"])) {
                    // line 177
                    yield "                                ";
                    if ( !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 177))) {
                        // line 178
                        yield "                                    ";
                        $context['_parent'] = $context;
                        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "customFieldValues", [], "any", false, false, false, 178));
                        foreach ($context['_seq'] as $context["_key"] => $context["customFieldValues"]) {
                            // line 179
                            yield "                                        <div class=\"uv-split-field\">
                                            <label>
                                                <div class=\"uv-radio\">
                                                    <input type=\"radio\" name=\"customFields[";
                            // line 182
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 182), "html", null, true);
                            yield "]\" value=\"";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 182), "html", null, true);
                            yield "\" id=\"for";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 182) . CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 182)), "html", null, true);
                            yield "\" class=\"create-ticket\"/>
                                                    <span class=\"uv-radio-view\"></span>
                                                </div>
                                                <span class=\"uv-radio-label\" for=\"for";
                            // line 185
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 185) . CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "id", [], "any", false, false, false, 185)), "html", null, true);
                            yield "\">";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customFieldValues"], "name", [], "any", false, false, false, 185), "html", null, true);
                            yield "</span>
                                            </label><span class=\"error-message\" style=\"display: none;\">This field is mandatory</span>

                                        </div>
                                    ";
                        }
                        $_parent = $context['_parent'];
                        unset($context['_seq'], $context['_key'], $context['customFieldValues'], $context['_parent']);
                        $context = array_intersect_key($context, $_parent) + $_parent;
                        // line 190
                        yield "                                ";
                    } else {
                        // line 191
                        yield "                                    <!--Hide this beacause choices aren't available-->
                                    ";
                        // line 192
                        $context["removeMe"] = Twig\Extension\CoreExtension::merge(($context["removeMe"] ?? null), [(("for" . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "name", [], "any", false, false, false, 192)) . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 192))]);
                        // line 193
                        yield "                                ";
                    }
                    // line 194
                    yield "
                            ";
                }
                // line 196
                yield "                            ";
                if (CoreExtension::getAttribute($this->env, $this->source, ($context["formErrors"] ?? null), (("customFields[" . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 196)) . "]"), [], "array", true, true, false, 196)) {
                    // line 197
                    yield "                                <div class=\"text-danger\">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_2 = ($context["formErrors"] ?? null)) && is_array($__internal_compile_2) || $__internal_compile_2 instanceof ArrayAccess ? ($__internal_compile_2[(("customFields[" . CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 197)) . "]")] ?? null) : null), "html", null, true);
                    yield "</div>
                            ";
                }
                // line 199
                yield "                        </div>
                    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['key'], $context['customField'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 201
            yield "                </div>
            ";
        }
        // line 203
        yield "
            <div class=\"uv-element-block\">
                <button type=\"submit\" id=\"create-ticket-btn\" class=\"uv-btn\">";
        // line 205
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Create Ticket"), "html", null, true);
        yield "</button>
            </div>
        </form>
    </div>
</div>

";
        // line 211
        if ( !CoreExtension::inFilter(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 211), "attributes", [], "any", false, false, false, 211), "get", ["_route"], "method", false, false, false, 211), ["helpdesk_member_ticket"])) {
            // line 212
            yield "    ";
            yield Twig\Extension\CoreExtension::include($this->env, $context, "@UVDeskCoreFramework\\Templates\\attachment.html.twig");
            yield "
";
        }
        // line 214
        yield "
";
        // line 215
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["user_service"] ?? null), "isfileExists", ["apps/uvdesk/custom-fields"], "method", false, false, false, 215)) {
            // line 216
            yield "<script>
    customFieldValidation = {};
    customHandler = function(value, attr, computedState) {
        if(!\$('[name=\"'+ attr + '\"]').parents('.uv-element-block').is(':visible') && !\$('[name=\"'+ attr + '[]' + '\"]').parents('.uv-element-block').is(':visible')) {
            return false;
        } else {
            var ele = \$('[name=\"'+ attr + '\"]');
            ele = ele.length ? ele : \$('[name=\"'+ attr + '[]' + '\"]');
            if(ele[0].type == 'radio') {
                var returnMe = true;
                \$.each(ele, function(key, eleChild) {
                    if(\$(eleChild).is(':checked')) {
                        returnMe = false;
                    }
                });
                return returnMe;
            } else if(ele[0].type == 'checkbox') {
                var returnMe = true;
                \$.each(ele, function(key, eleChild) {
                    if(\$(eleChild).is(':checked')) {
                        returnMe = false;
                    }
                });
                return returnMe;
            } else if(!\$('#create-ticket-form [name=\"'+ attr + '\"]').val()) {
                return true;
            }
        }
    };
    _.extend(Backbone.Validation.validators, {
        checkAllowedDomain: function(value, attr, customValue, model) {
            if(!\$('[name=\"'+ attr + '\"]').parents('.uv-element-block').is(':visible'))
                return false;
            domain = value.substring(value.indexOf(\"@\") + 1);
            if(customValue && customValue.indexOf(domain) === -1) {
                return true; //return error
            }
        },
        checkRestrictedDomain: function(value, attr, customValue, model) {
            if(!\$('[name=\"'+ attr + '\"]').parents('.uv-element-block').is(':visible'))
                return false;
            domain = value.substring(value.indexOf(\"@\") + 1);
            if(customValue && customValue.indexOf(domain) !== -1) {
                return true; //return error
            }
        },
        checkMaxFileSize: function(value, attr, customValue, model) {
            if(!\$('[name=\"'+ attr + '\"]').parents('.uv-element-block').is(':visible'))
                return false;
            fileInput = \$('input[name=\"' + attr + '\"]')[0] ? \$('input[name=\"' + attr + '\"]')[0] : \$('input[name=\"' + attr + '\"]');
            file = fileInput.files? fileInput.files[0] : '';
            filesize = file ? file.size / 1024 : 0;
            maxSize = (customValue && parseInt(customValue)) ? parseInt(customValue) : 5120;
            
            if(filesize > maxSize) {
                return true; //return error
            }
        },
        patternOrEmpty: function(value, attr, pattern, model) {
            defaultPatterns = Backbone.Validation.patterns;
            if (value && !value.toString().match(defaultPatterns[pattern] || pattern)) {
                return true; //error
            }
        },
      minOrEmpty: function(value, attr, minValue, model) {
        if (value && (value < minValue)) {
          return true; //error
        }
      },
      maxOrEmpty: function(value, attr, maxValue, model) {
        if (value && (value > maxValue)) {
          return true; //error
        }
      },
      patternCheck: function(value, attr, pattern, model) {
        if (value && !value.toString().match(pattern)) {
            return true; //error
        }
      },
    });
        ";
            // line 296
            if ((array_key_exists("headerCustomFields", $context) && ($context["headerCustomFields"] ?? null))) {
                // line 297
                yield "            ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(($context["headerCustomFields"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["customField"]) {
                    // line 298
                    yield "                ";
                    $context["fieldtype"] = ((("text" != (($__internal_compile_3 = $context["customField"]) && is_array($__internal_compile_3) || $__internal_compile_3 instanceof ArrayAccess ? ($__internal_compile_3["fieldType"] ?? null) : null))) ? ((($__internal_compile_4 = $context["customField"]) && is_array($__internal_compile_4) || $__internal_compile_4 instanceof ArrayAccess ? ($__internal_compile_4["fieldType"] ?? null) : null)) : (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 298), "fieldtype", [], "array", true, true, false, 298)) ? ((($__internal_compile_5 = (($__internal_compile_6 = $context["customField"]) && is_array($__internal_compile_6) || $__internal_compile_6 instanceof ArrayAccess ? ($__internal_compile_6["validation"] ?? null) : null)) && is_array($__internal_compile_5) || $__internal_compile_5 instanceof ArrayAccess ? ($__internal_compile_5["fieldtype"] ?? null) : null)) : ("text"))));
                    // line 299
                    yield "                    customFieldValidation['customFields[' + ";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 299), "html", null, true);
                    yield " + ']'] = [
                    ";
                    // line 300
                    if (( !(CoreExtension::inFilter(($context["fieldtype"] ?? null), ["checkbox", "radio", "select"]) && Twig\Extension\CoreExtension::testEmpty((($__internal_compile_7 = $context["customField"]) && is_array($__internal_compile_7) || $__internal_compile_7 instanceof ArrayAccess ? ($__internal_compile_7["customFieldValues"] ?? null) : null))) && CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 300))) {
                        // line 301
                        yield "                        {
                        fn : customHandler,
                        msg : '";
                        // line 303
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
                        yield "'
                    },
                    ";
                    }
                    // line 306
                    yield "                    ";
                    if (("number" == ($context["fieldtype"] ?? null))) {
                        // line 307
                        yield "                        {
                            patternOrEmpty : 'number',
                            msg: '";
                        // line 309
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Value is not valid number"), "html", null, true);
                        yield "',
                        },
                        ";
                        // line 311
                        if ((($__internal_compile_8 = (($__internal_compile_9 = $context["customField"]) && is_array($__internal_compile_9) || $__internal_compile_9 instanceof ArrayAccess ? ($__internal_compile_9["validation"] ?? null) : null)) && is_array($__internal_compile_8) || $__internal_compile_8 instanceof ArrayAccess ? ($__internal_compile_8["minNo"] ?? null) : null)) {
                            yield " 
                            {
                                minOrEmpty: ";
                            // line 313
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_10 = (($__internal_compile_11 = $context["customField"]) && is_array($__internal_compile_11) || $__internal_compile_11 instanceof ArrayAccess ? ($__internal_compile_11["validation"] ?? null) : null)) && is_array($__internal_compile_10) || $__internal_compile_10 instanceof ArrayAccess ? ($__internal_compile_10["minNo"] ?? null) : null), "html", null, true);
                            yield ",
                                msg: '";
                            // line 314
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide number greater than %min%", ["%min%" => (($__internal_compile_12 = (($__internal_compile_13 = $context["customField"]) && is_array($__internal_compile_13) || $__internal_compile_13 instanceof ArrayAccess ? ($__internal_compile_13["validation"] ?? null) : null)) && is_array($__internal_compile_12) || $__internal_compile_12 instanceof ArrayAccess ? ($__internal_compile_12["minNo"] ?? null) : null)]), "html", null, true);
                            yield "',
                            },
                        ";
                        }
                        // line 317
                        yield "                        ";
                        if ((($__internal_compile_14 = (($__internal_compile_15 = $context["customField"]) && is_array($__internal_compile_15) || $__internal_compile_15 instanceof ArrayAccess ? ($__internal_compile_15["validation"] ?? null) : null)) && is_array($__internal_compile_14) || $__internal_compile_14 instanceof ArrayAccess ? ($__internal_compile_14["maxNo"] ?? null) : null)) {
                            yield " 
                        {
                            maxOrEmpty: ";
                            // line 319
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_16 = (($__internal_compile_17 = $context["customField"]) && is_array($__internal_compile_17) || $__internal_compile_17 instanceof ArrayAccess ? ($__internal_compile_17["validation"] ?? null) : null)) && is_array($__internal_compile_16) || $__internal_compile_16 instanceof ArrayAccess ? ($__internal_compile_16["maxNo"] ?? null) : null), "html", null, true);
                            yield ",
                            msg: '";
                            // line 320
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide number smaller than %max%", ["%max%" => (($__internal_compile_18 = (($__internal_compile_19 = $context["customField"]) && is_array($__internal_compile_19) || $__internal_compile_19 instanceof ArrayAccess ? ($__internal_compile_19["validation"] ?? null) : null)) && is_array($__internal_compile_18) || $__internal_compile_18 instanceof ArrayAccess ? ($__internal_compile_18["maxNo"] ?? null) : null)]), "html", null, true);
                            yield "',
                        },
                        ";
                        }
                        // line 323
                        yield "                    ";
                    } elseif (("email" == ($context["fieldtype"] ?? null))) {
                        // line 324
                        yield "                        {
                            patternOrEmpty: /^((([a-z]|\\d|[!#\\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\$/i,
                            msg: '";
                        // line 326
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email Address is invalid"), "html", null, true);
                        yield "',
                        },
                        ";
                        // line 328
                        if ((($__internal_compile_20 = (($__internal_compile_21 = $context["customField"]) && is_array($__internal_compile_21) || $__internal_compile_21 instanceof ArrayAccess ? ($__internal_compile_21["validation"] ?? null) : null)) && is_array($__internal_compile_20) || $__internal_compile_20 instanceof ArrayAccess ? ($__internal_compile_20["allowedDomain"] ?? null) : null)) {
                            // line 329
                            yield "                            {
                                checkAllowedDomain: \"";
                            // line 330
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_22 = (($__internal_compile_23 = $context["customField"]) && is_array($__internal_compile_23) || $__internal_compile_23 instanceof ArrayAccess ? ($__internal_compile_23["validation"] ?? null) : null)) && is_array($__internal_compile_22) || $__internal_compile_22 instanceof ArrayAccess ? ($__internal_compile_22["allowedDomain"] ?? null) : null), "html", null, true);
                            yield "\",
                                msg: '";
                            // line 331
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Domain name should be in accepted domains"), "html", null, true);
                            yield "',
                            },
                        ";
                        }
                        // line 334
                        yield "                        ";
                        if ((($__internal_compile_24 = (($__internal_compile_25 = $context["customField"]) && is_array($__internal_compile_25) || $__internal_compile_25 instanceof ArrayAccess ? ($__internal_compile_25["validation"] ?? null) : null)) && is_array($__internal_compile_24) || $__internal_compile_24 instanceof ArrayAccess ? ($__internal_compile_24["restrictedDomain"] ?? null) : null)) {
                            // line 335
                            yield "                            {
                                checkRestrictedDomain: \"";
                            // line 336
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_26 = (($__internal_compile_27 = $context["customField"]) && is_array($__internal_compile_27) || $__internal_compile_27 instanceof ArrayAccess ? ($__internal_compile_27["validation"] ?? null) : null)) && is_array($__internal_compile_26) || $__internal_compile_26 instanceof ArrayAccess ? ($__internal_compile_26["restrictedDomain"] ?? null) : null), "html", null, true);
                            yield "\",
                                msg: '";
                            // line 337
                            yield "Domain name should not be in restricted domains";
                            yield "',
                            } ,
                        ";
                        }
                        // line 340
                        yield "                    ";
                    } elseif (("url" == ($context["fieldtype"] ?? null))) {
                        // line 341
                        yield "                        {
                            patternOrEmpty: 'url',
                            msg: '";
                        // line 343
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide a valid url(with protocol)"), "html", null, true);
                        yield "',
                        } ,
                    ";
                    } elseif (("file" ==                     // line 345
($context["fieldtype"] ?? null))) {
                        // line 346
                        yield "                        {
                            checkMaxFileSize: \"";
                        // line 347
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_28 = (($__internal_compile_29 = $context["customField"]) && is_array($__internal_compile_29) || $__internal_compile_29 instanceof ArrayAccess ? ($__internal_compile_29["validation"] ?? null) : null)) && is_array($__internal_compile_28) || $__internal_compile_28 instanceof ArrayAccess ? ($__internal_compile_28["maxFileSize"] ?? null) : null), "html", null, true);
                        yield "\",
                            msg: '";
                        // line 348
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("file size should not exceed %value% KB", ["%value%" => (((($__internal_compile_30 = (($__internal_compile_31 = $context["customField"]) && is_array($__internal_compile_31) || $__internal_compile_31 instanceof ArrayAccess ? ($__internal_compile_31["validation"] ?? null) : null)) && is_array($__internal_compile_30) || $__internal_compile_30 instanceof ArrayAccess ? ($__internal_compile_30["maxFileSize"] ?? null) : null)) ?: ("5120"))]), "html", null, true);
                        yield "',
                        } ,
                    ";
                    }
                    // line 351
                    yield "                    ";
                    if ((( !CoreExtension::inFilter(($context["fieldtype"] ?? null), ["checkbox", "radio", "select"]) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 351), "regex", [], "array", true, true, false, 351)) && (($__internal_compile_32 = (($__internal_compile_33 = $context["customField"]) && is_array($__internal_compile_33) || $__internal_compile_33 instanceof ArrayAccess ? ($__internal_compile_33["validation"] ?? null) : null)) && is_array($__internal_compile_32) || $__internal_compile_32 instanceof ArrayAccess ? ($__internal_compile_32["regex"] ?? null) : null))) {
                        // line 352
                        yield "                        {
                            patternCheck: \"";
                        // line 353
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_34 = (($__internal_compile_35 = $context["customField"]) && is_array($__internal_compile_35) || $__internal_compile_35 instanceof ArrayAccess ? ($__internal_compile_35["validation"] ?? null) : null)) && is_array($__internal_compile_34) || $__internal_compile_34 instanceof ArrayAccess ? ($__internal_compile_34["regex"] ?? null) : null), "html", null, true);
                        yield "\",
                            msg: \"";
                        // line 354
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This Field Value is not Valid"), "html", null, true);
                        yield "\",
                        } ,
                    ";
                    }
                    // line 357
                    yield "                ];
                Array.isArray(validationParameters) ? validationParameters.push(value) : false;
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_key'], $context['customField'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 360
                yield "        ";
            }
            // line 361
            yield "        ";
            if ((array_key_exists("CustomerCustomFields", $context) && ($context["CustomerCustomFields"] ?? null))) {
                // line 362
                yield "            ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(($context["CustomerCustomFields"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["customField"]) {
                    // line 363
                    yield "                ";
                    $context["fieldtype"] = ((("text" != (($__internal_compile_36 = $context["customField"]) && is_array($__internal_compile_36) || $__internal_compile_36 instanceof ArrayAccess ? ($__internal_compile_36["fieldType"] ?? null) : null))) ? ((($__internal_compile_37 = $context["customField"]) && is_array($__internal_compile_37) || $__internal_compile_37 instanceof ArrayAccess ? ($__internal_compile_37["fieldType"] ?? null) : null)) : (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 363), "fieldtype", [], "array", true, true, false, 363)) ? ((($__internal_compile_38 = (($__internal_compile_39 = $context["customField"]) && is_array($__internal_compile_39) || $__internal_compile_39 instanceof ArrayAccess ? ($__internal_compile_39["validation"] ?? null) : null)) && is_array($__internal_compile_38) || $__internal_compile_38 instanceof ArrayAccess ? ($__internal_compile_38["fieldtype"] ?? null) : null)) : ("text"))));
                    // line 364
                    yield "                    customFieldValidation['customFields[' + ";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "id", [], "any", false, false, false, 364), "html", null, true);
                    yield " + ']'] = [
                    ";
                    // line 365
                    if (( !(CoreExtension::inFilter(($context["fieldtype"] ?? null), ["checkbox", "radio", "select"]) && Twig\Extension\CoreExtension::testEmpty((($__internal_compile_40 = $context["customField"]) && is_array($__internal_compile_40) || $__internal_compile_40 instanceof ArrayAccess ? ($__internal_compile_40["customFieldValues"] ?? null) : null))) && CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "required", [], "any", false, false, false, 365))) {
                        // line 366
                        yield "                        {
                        fn : customHandler,
                        msg : '";
                        // line 368
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
                        yield "'
                    },
                    ";
                    }
                    // line 371
                    yield "                    ";
                    if (("number" == ($context["fieldtype"] ?? null))) {
                        // line 372
                        yield "                        {
                            patternOrEmpty : 'number',
                            msg: '";
                        // line 374
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Value is not valid number"), "html", null, true);
                        yield "',
                        },
                        ";
                        // line 376
                        if ((($__internal_compile_41 = (($__internal_compile_42 = $context["customField"]) && is_array($__internal_compile_42) || $__internal_compile_42 instanceof ArrayAccess ? ($__internal_compile_42["validation"] ?? null) : null)) && is_array($__internal_compile_41) || $__internal_compile_41 instanceof ArrayAccess ? ($__internal_compile_41["minNo"] ?? null) : null)) {
                            yield " 
                            {
                                minOrEmpty: ";
                            // line 378
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_43 = (($__internal_compile_44 = $context["customField"]) && is_array($__internal_compile_44) || $__internal_compile_44 instanceof ArrayAccess ? ($__internal_compile_44["validation"] ?? null) : null)) && is_array($__internal_compile_43) || $__internal_compile_43 instanceof ArrayAccess ? ($__internal_compile_43["minNo"] ?? null) : null), "html", null, true);
                            yield ",
                                msg: '";
                            // line 379
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide number greater than %min%", ["%min%" => (($__internal_compile_45 = (($__internal_compile_46 = $context["customField"]) && is_array($__internal_compile_46) || $__internal_compile_46 instanceof ArrayAccess ? ($__internal_compile_46["validation"] ?? null) : null)) && is_array($__internal_compile_45) || $__internal_compile_45 instanceof ArrayAccess ? ($__internal_compile_45["minNo"] ?? null) : null)]), "html", null, true);
                            yield "',
                            },
                        ";
                        }
                        // line 382
                        yield "                        ";
                        if ((($__internal_compile_47 = (($__internal_compile_48 = $context["customField"]) && is_array($__internal_compile_48) || $__internal_compile_48 instanceof ArrayAccess ? ($__internal_compile_48["validation"] ?? null) : null)) && is_array($__internal_compile_47) || $__internal_compile_47 instanceof ArrayAccess ? ($__internal_compile_47["maxNo"] ?? null) : null)) {
                            yield " 
                        {
                            maxOrEmpty: ";
                            // line 384
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_49 = (($__internal_compile_50 = $context["customField"]) && is_array($__internal_compile_50) || $__internal_compile_50 instanceof ArrayAccess ? ($__internal_compile_50["validation"] ?? null) : null)) && is_array($__internal_compile_49) || $__internal_compile_49 instanceof ArrayAccess ? ($__internal_compile_49["maxNo"] ?? null) : null), "html", null, true);
                            yield ",
                            msg: '";
                            // line 385
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide number smaller than %max%", ["%max%" => (($__internal_compile_51 = (($__internal_compile_52 = $context["customField"]) && is_array($__internal_compile_52) || $__internal_compile_52 instanceof ArrayAccess ? ($__internal_compile_52["validation"] ?? null) : null)) && is_array($__internal_compile_51) || $__internal_compile_51 instanceof ArrayAccess ? ($__internal_compile_51["maxNo"] ?? null) : null)]), "html", null, true);
                            yield "',
                        },
                        ";
                        }
                        // line 388
                        yield "                    ";
                    } elseif (("email" == ($context["fieldtype"] ?? null))) {
                        // line 389
                        yield "                        {
                            patternOrEmpty: /^((([a-z]|\\d|[!#\\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\$/i,
                            msg: '";
                        // line 391
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email Address is invalid"), "html", null, true);
                        yield "',
                        },
                        ";
                        // line 393
                        if ((($__internal_compile_53 = (($__internal_compile_54 = $context["customField"]) && is_array($__internal_compile_54) || $__internal_compile_54 instanceof ArrayAccess ? ($__internal_compile_54["validation"] ?? null) : null)) && is_array($__internal_compile_53) || $__internal_compile_53 instanceof ArrayAccess ? ($__internal_compile_53["allowedDomain"] ?? null) : null)) {
                            // line 394
                            yield "                            {
                                checkAllowedDomain: \"";
                            // line 395
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_55 = (($__internal_compile_56 = $context["customField"]) && is_array($__internal_compile_56) || $__internal_compile_56 instanceof ArrayAccess ? ($__internal_compile_56["validation"] ?? null) : null)) && is_array($__internal_compile_55) || $__internal_compile_55 instanceof ArrayAccess ? ($__internal_compile_55["allowedDomain"] ?? null) : null), "html", null, true);
                            yield "\",
                                msg: '";
                            // line 396
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Domain name should be in accepted domains"), "html", null, true);
                            yield "',
                            },
                        ";
                        }
                        // line 399
                        yield "                        ";
                        if ((($__internal_compile_57 = (($__internal_compile_58 = $context["customField"]) && is_array($__internal_compile_58) || $__internal_compile_58 instanceof ArrayAccess ? ($__internal_compile_58["validation"] ?? null) : null)) && is_array($__internal_compile_57) || $__internal_compile_57 instanceof ArrayAccess ? ($__internal_compile_57["restrictedDomain"] ?? null) : null)) {
                            // line 400
                            yield "                            {
                                checkRestrictedDomain: \"";
                            // line 401
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_59 = (($__internal_compile_60 = $context["customField"]) && is_array($__internal_compile_60) || $__internal_compile_60 instanceof ArrayAccess ? ($__internal_compile_60["validation"] ?? null) : null)) && is_array($__internal_compile_59) || $__internal_compile_59 instanceof ArrayAccess ? ($__internal_compile_59["restrictedDomain"] ?? null) : null), "html", null, true);
                            yield "\",
                                msg: '";
                            // line 402
                            yield "Domain name should not be in restricted domains";
                            yield "',
                            } ,
                        ";
                        }
                        // line 405
                        yield "                    ";
                    } elseif (("url" == ($context["fieldtype"] ?? null))) {
                        // line 406
                        yield "                        {
                            patternOrEmpty: 'url',
                            msg: '";
                        // line 408
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Provide a valid url(with protocol)"), "html", null, true);
                        yield "',
                        } ,
                    ";
                    } elseif (("file" ==                     // line 410
($context["fieldtype"] ?? null))) {
                        // line 411
                        yield "                        {
                            checkMaxFileSize: \"";
                        // line 412
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_61 = (($__internal_compile_62 = $context["customField"]) && is_array($__internal_compile_62) || $__internal_compile_62 instanceof ArrayAccess ? ($__internal_compile_62["validation"] ?? null) : null)) && is_array($__internal_compile_61) || $__internal_compile_61 instanceof ArrayAccess ? ($__internal_compile_61["maxFileSize"] ?? null) : null), "html", null, true);
                        yield "\",
                            msg: '";
                        // line 413
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("file size should not exceed %value% KB", ["%value%" => (((($__internal_compile_63 = (($__internal_compile_64 = $context["customField"]) && is_array($__internal_compile_64) || $__internal_compile_64 instanceof ArrayAccess ? ($__internal_compile_64["validation"] ?? null) : null)) && is_array($__internal_compile_63) || $__internal_compile_63 instanceof ArrayAccess ? ($__internal_compile_63["maxFileSize"] ?? null) : null)) ?: ("5120"))]), "html", null, true);
                        yield "',
                        } ,
                    ";
                    }
                    // line 416
                    yield "                    ";
                    if ((( !CoreExtension::inFilter(($context["fieldtype"] ?? null), ["checkbox", "radio", "select"]) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["customField"], "validation", [], "array", false, true, false, 416), "regex", [], "array", true, true, false, 416)) && (($__internal_compile_65 = (($__internal_compile_66 = $context["customField"]) && is_array($__internal_compile_66) || $__internal_compile_66 instanceof ArrayAccess ? ($__internal_compile_66["validation"] ?? null) : null)) && is_array($__internal_compile_65) || $__internal_compile_65 instanceof ArrayAccess ? ($__internal_compile_65["regex"] ?? null) : null))) {
                        // line 417
                        yield "                        {
                            patternCheck: \"";
                        // line 418
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($__internal_compile_67 = (($__internal_compile_68 = $context["customField"]) && is_array($__internal_compile_68) || $__internal_compile_68 instanceof ArrayAccess ? ($__internal_compile_68["validation"] ?? null) : null)) && is_array($__internal_compile_67) || $__internal_compile_67 instanceof ArrayAccess ? ($__internal_compile_67["regex"] ?? null) : null), "html", null, true);
                        yield "\",
                            msg: \"";
                        // line 419
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This Field Value is not Valid"), "html", null, true);
                        yield "\",
                        } ,
                    ";
                    }
                    // line 422
                    yield "                ];
                Array.isArray(validationParameters) ? validationParameters.push(value) : false;
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_key'], $context['customField'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 425
                yield "        ";
            }
            // line 426
            yield "    var validationParameters = true;
</script>
";
        }
        // line 429
        yield Twig\Extension\CoreExtension::include($this->env, $context, "@UVDeskSupportCenter/Templates/tinyMCE.html.twig");
        yield "

<script type=\"text/javascript\">
    \$(function () {
        if (typeof(customFieldValidation) == 'undefined') {
            customFieldValidation = {};
        }
        ";
        // line 436
        if (array_key_exists("removeMe", $context)) {
            // line 437
            yield "            \$.each(";
            yield json_encode(($context["removeMe"] ?? null));
            yield ", function(key, value){
                \$('label[for=\"' + value + '\"]').parent().hide();
            });
        ";
        }
        // line 441
        yield "
        \$('.uv-header-date').datetimepicker({
            format: 'YYYY-MM-DD',
        });
        \$('.uv-header-time').datetimepicker({
            format: 'LT',
        });
        \$('.uv-header-datetime').datetimepicker({
            format: 'YYYY-MM-DD H:m:s'
        });

        var CreateTicketModel = Backbone.Model.extend({
            idAttribute : \"id\",
            defaults : {
                path : \"\",
            },
            validation: _.extend(customFieldValidation, {
                ";
        // line 458
        if ( !($context["isTicketViewPage"] ?? null)) {
            // line 459
            yield "                    'name' : {
                        required : true,
                        msg : \"";
            // line 461
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
            yield "\"
                    },
                    'from' :
                    [{
                        required : true,
                        msg : \"";
            // line 466
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
            yield "\"
                    },{
                        pattern : /^[a-zA-Z0-9.!#\$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\$/,
                        msg : \"";
            // line 469
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html", null, true);
            yield "\"
                    }],
                ";
        }
        // line 472
        yield "                'type' : {
                    required : true,
                    msg : \"";
        // line 474
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "\"
                },
                'subject' : {
                    required : true,
                    msg : \"";
        // line 478
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "\"
                },
                'reply' : {
                    fn: function(value) {
                            if(!tinyMCE.get(\"uv-edit-create-thread\"))
                                return false;
                            var html = tinyMCE.get(\"uv-edit-create-thread\").getContent();
                            if(app.appView.stripHTML(html) != '') {
                                return false;
                            }
                            return true;
                        },
                    msg : \"";
        // line 490
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "\"
                },
            }),
            urlRoot : \"";
        // line 493
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_create_ticket");
        yield "\"
        });

        sfTinyMce.init({
            height: '155px',
\t\t\tselector : '#create-reply',
\t\t\timages_upload_url: \"\",
            setup: function(editor) {
            },
\t\t\tplugins: [
            ],
\t\t\ttoolbar: '| undo redo | bold italic forecolor ',
\t\t});

        var CreateTicketForm = Backbone.View.extend({
            el : \$(\"#create-ticket-modal #create-ticket-form\"),
            model: new CreateTicketModel(),
            initialize : function() {
                Backbone.Validation.bind(this);
                var jsonContext = JSON.parse('";
        // line 512
        yield ((array_key_exists("errors", $context)) ? (($context["errors"] ?? null)) : ("{}"));
        yield "');
                for (var field in jsonContext) {
                    Backbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
                }
            },
            events : {
                'click #create-ticket-btn': \"saveTicket\",
                'change #type': \"updateCustomFields\",
                'blur input.create-ticket:not(input[type=file]), textarea.create-ticket, select.create-ticket, checkbox.create-ticket': 'formChanegd',
                'change input[type=file].create-ticket': 'formChanegd',
            },
            formChanegd: function(e) {
                this.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
                this.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
            },
            saveTicket: function (e) {
                e.preventDefault();
                var currentElement = Backbone.\$(e.currentTarget);
                var data = currentElement.closest('form').serializeObject();
                this.model = new CreateTicketModel();
                this.model.set(data);
                Backbone.Validation.bind(this);
                
                if (this.model.isValid(true)) {
                    \$('#create-ticket-form').submit();
                    \$('form').find('#create-ticket-btn').attr('disabled', 'disabled');
                }
            },
            updateCustomFields: function (e) {
                const dependentFields = e.currentTarget.value;
                this.\$('.dependent').hide();
                this.\$('.dependency' + dependentFields).show();
            }
        });

        new CreateTicketForm();
    });
</script>
";
        // line 635
        yield "<script>
function fetchNames() {
    let NameDiv = document.getElementById('Name-div');
    let query = NameDiv.querySelector('#GetName').value;

    if (query.length >= 1) {
        \$.ajax({
            url: \"";
        // line 642
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("get_User_FullNames");
        yield "\",
            method: 'GET',
            data: { query: encodeURIComponent(query) },
            dataType: 'json',
            success: function (response) {
                
                // Use NameDiv to access the suggestions container
                let suggestion = NameDiv.querySelector('#nameSuggestions');
                suggestion.innerHTML = '';
                suggestion.style.display = 'block'; // Show suggestions box

               response.forEach(function (item) {
                    let fullName = item.full_name;
                    let div = document.createElement('div');
                    div.className = 'suggestion';
                    div.innerText = fullName;
                    div.onclick = function() {
                        NameDiv.querySelector('#GetName').value = fullName;
                        suggestion.style.display = 'none'; // Hide suggestions box after selection
                    };
                    suggestion.appendChild(div);
                });
            },
            error: function(xhr, status, error) {
                console.error('AJAX Error:', status, error);
            }
        });
    } else {
        NameDiv.querySelector('#nameSuggestions').style.display = 'none'; // Hide suggestions box if input is too short
    }
}

// Hide suggestions when clicking outside of the email input field and suggestions box
document.addEventListener('click', function(e) {
    let NameDiv = document.getElementById('Name-div');
    if (!NameDiv.contains(e.target)) {
        NameDiv.querySelector('#nameSuggestions').style.display = 'none';
    }
});

</script>
<script>
    function fetchEmails() {
        let emailDiv = document.getElementById('email-div');
        let query = emailDiv.querySelector('#email-input').value;

        if (query.length >= 1) {
    \$.ajax({
        url: \"";
        // line 690
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fetch_emails");
        yield "\",
        method: 'GET',
        data: { query: encodeURIComponent(query) },
        dataType: 'json',
        success: function(data) {
            let suggestions = emailDiv.querySelector('#email-suggestions');
            suggestions.innerHTML = '';
            suggestions.style.display = 'block'; // Show suggestions box

            data.forEach(email => {
                let div = document.createElement('div');
                div.className = 'suggestion';
                div.innerText = email;
                div.onclick = function() {
                    emailDiv.querySelector('#email-input').value = email;
                    suggestions.style.display = 'none'; // Hide suggestions box after selection
                };
                suggestions.appendChild(div);
            });
        },
        error: function(xhr, status, error) {
            console.error('AJAX Error: ', status, error);
        }
    });
} else {
    emailDiv.querySelector('#email-suggestions').style.display = 'none'; // Hide suggestions box if input is too short
}
    }

    // Hide suggestions when clicking outside of the email input field and suggestions box
    document.addEventListener('click', function(e) {
        let emailDiv = document.getElementById('email-div');
        if (!emailDiv.contains(e.target)) {
            emailDiv.querySelector('#email-suggestions').style.display = 'none';
        }
    });
</script>

<style>
    .suggestions-box {
        border: 1px solid #ccc;
        position: absolute;
        z-index: 9999;
        background: #fff;
        max-height: 150px;
        overflow-y: auto;
        width: 100%;
    }
    .suggestion {
        padding: 8px;
        cursor: pointer;
    }
    .suggestion:hover {
        background-color: #f0f0f0;
    }
</style>
";
        
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "@UVDeskCoreFramework/Snippets/createMemberTicket.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  1195 => 690,  1144 => 642,  1135 => 635,  1094 => 512,  1072 => 493,  1066 => 490,  1051 => 478,  1044 => 474,  1040 => 472,  1034 => 469,  1028 => 466,  1020 => 461,  1016 => 459,  1014 => 458,  995 => 441,  987 => 437,  985 => 436,  975 => 429,  970 => 426,  967 => 425,  959 => 422,  953 => 419,  949 => 418,  946 => 417,  943 => 416,  937 => 413,  933 => 412,  930 => 411,  928 => 410,  923 => 408,  919 => 406,  916 => 405,  910 => 402,  906 => 401,  903 => 400,  900 => 399,  894 => 396,  890 => 395,  887 => 394,  885 => 393,  880 => 391,  876 => 389,  873 => 388,  867 => 385,  863 => 384,  857 => 382,  851 => 379,  847 => 378,  842 => 376,  837 => 374,  833 => 372,  830 => 371,  824 => 368,  820 => 366,  818 => 365,  813 => 364,  810 => 363,  805 => 362,  802 => 361,  799 => 360,  791 => 357,  785 => 354,  781 => 353,  778 => 352,  775 => 351,  769 => 348,  765 => 347,  762 => 346,  760 => 345,  755 => 343,  751 => 341,  748 => 340,  742 => 337,  738 => 336,  735 => 335,  732 => 334,  726 => 331,  722 => 330,  719 => 329,  717 => 328,  712 => 326,  708 => 324,  705 => 323,  699 => 320,  695 => 319,  689 => 317,  683 => 314,  679 => 313,  674 => 311,  669 => 309,  665 => 307,  662 => 306,  656 => 303,  652 => 301,  650 => 300,  645 => 299,  642 => 298,  637 => 297,  635 => 296,  553 => 216,  551 => 215,  548 => 214,  542 => 212,  540 => 211,  531 => 205,  527 => 203,  523 => 201,  516 => 199,  510 => 197,  507 => 196,  503 => 194,  500 => 193,  498 => 192,  495 => 191,  492 => 190,  479 => 185,  469 => 182,  464 => 179,  459 => 178,  456 => 177,  454 => 176,  451 => 175,  448 => 174,  446 => 173,  443 => 172,  440 => 171,  427 => 166,  417 => 163,  412 => 160,  407 => 159,  404 => 158,  402 => 157,  399 => 156,  396 => 155,  394 => 154,  391 => 153,  385 => 149,  374 => 147,  370 => 146,  366 => 145,  358 => 144,  355 => 143,  352 => 142,  350 => 141,  339 => 137,  336 => 136,  334 => 135,  323 => 131,  320 => 130,  318 => 129,  300 => 126,  297 => 125,  295 => 124,  280 => 120,  277 => 119,  275 => 118,  269 => 117,  252 => 116,  248 => 115,  245 => 114,  242 => 113,  239 => 112,  232 => 107,  228 => 105,  222 => 101,  216 => 98,  211 => 96,  208 => 95,  202 => 91,  194 => 86,  191 => 85,  185 => 81,  181 => 79,  172 => 76,  165 => 75,  160 => 74,  155 => 72,  149 => 69,  146 => 68,  143 => 66,  137 => 64,  135 => 63,  129 => 60,  121 => 55,  118 => 54,  112 => 50,  108 => 49,  100 => 44,  97 => 43,  95 => 42,  92 => 41,  88 => 39,  81 => 34,  79 => 33,  45 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "@UVDeskCoreFramework/Snippets/createMemberTicket.html.twig", "/home/bmdranzo/public_html/vendor/uvdesk/core-framework/Resources/views/Snippets/createMemberTicket.html.twig");
    }
}
