<?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/Customers/createSupportCustomer.html.twig */
class __TwigTemplate_a6cf419b76ee5b3b53c96335749699a2 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->blocks = [
            'title' => [$this, 'block_title'],
            'pageContent' => [$this, 'block_pageContent'],
            'footer' => [$this, 'block_footer'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@UVDeskCoreFramework//Templates//layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->loadTemplate("@UVDeskCoreFramework//Templates//layout.html.twig", "@UVDeskCoreFramework/Customers/createSupportCustomer.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Customer"), "html", null, true);
        yield from [];
    }

    // line 5
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_pageContent(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 6
        yield "\t<div class=\"uv-inner-section\">
\t\t";
        // line 8
        yield "\t\t";
        $context["asideTemplate"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\Dashboard\\AsideTemplate";
        // line 9
        yield "\t\t";
        $context["asideSidebarReference"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\UIComponents\\Dashboard\\Panel\\Sidebars\\Users";
        // line 10
        yield "
\t\t";
        // line 11
        yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["uvdesk_extensibles"] ?? null), "getRegisteredComponent", [($context["asideTemplate"] ?? null)], "method", false, false, false, 11), "renderSidebar", [($context["asideSidebarReference"] ?? null)], "method", false, false, false, 11);
        yield "

\t\t<div class=\"uv-view ";
        // line 13
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 13), "cookies", [], "any", false, false, false, 13) && 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, 13), "cookies", [], "any", false, false, false, 13), "get", ["uv-asideView"], "method", false, false, false, 13))) {
            yield "uv-aside-view";
        }
        yield "\">
\t\t\t<h1>
\t\t\t\t";
        // line 15
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 15)) {
            // line 16
            yield "\t\t\t\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Customer"), "html", null, true);
            yield "
\t\t\t\t";
        } else {
            // line 18
            yield "\t\t\t\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Customer"), "html", null, true);
            yield "
\t\t\t\t";
        }
        // line 20
        yield "\t\t\t</h1>
\t\t\t";
        // line 21
        $context["customerDetails"] = CoreExtension::getAttribute($this->env, $this->source, ($context["user_service"] ?? null), "getCustomerDetailsById", [CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "id", [], "any", false, false, false, 21)], "method", false, false, false, 21);
        // line 22
        yield "\t\t\t<!--Form-->
\t\t\t<form method=\"post\" action=\"\" id=\"customer-form\" enctype=\"multipart/form-data\">
\t\t\t\t<!-- Profile image -->
\t\t\t\t<div class=\"uv-image-upload-wrapper\" style=\"padding: 25px 0px 25px 0px;\">
\t\t\t\t\t";
        // line 26
        $context["isHaveImage"] = (((($context["customerDetails"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "profileImage", [], "any", false, false, false, 26))) ? (1) : (0));
        // line 27
        yield "\t\t\t\t\t<div class=\"uv-image-upload-brick ";
        if (($context["isHaveImage"] ?? null)) {
            yield "uv-on-drop-shadow";
        }
        yield "\" ";
        if (($context["isHaveImage"] ?? null)) {
            yield "style=\"border-color: transparent;\"";
        }
        yield ">
\t\t\t\t\t\t<input type=\"file\" name=\"customer_form[profileImage]\" id=\"uv-upload-profile\">
\t\t\t\t\t\t<div class=\"uv-image-upload-placeholder\">
\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"48px\" height=\"32px\">
\t\t\t\t\t\t\t<path fill-rule=\"evenodd\" d=\"M28.026,26.003 L19.964,26.003 L19.964,17.962 L13.964,17.962 L23.995,8.050 L34.025,17.962 L28.026,17.962 L28.026,26.003 ZM33.557,3.421 C30.806,1.146 27.619,0.008 23.995,0.008 C21.182,0.008 18.588,0.756 16.214,2.252 C13.838,3.749 11.996,5.712 10.683,8.143 C7.683,8.456 5.152,9.749 3.090,12.024 C1.027,14.300 -0.004,16.965 -0.004,20.019 C-0.004,23.324 1.168,26.144 3.512,28.481 C5.855,30.819 8.682,31.988 11.996,31.988 L37.963,31.988 C40.712,31.988 43.072,31.006 45.040,29.042 C47.009,27.079 47.993,24.726 47.993,21.983 C47.993,19.364 47.087,17.106 45.275,15.203 C43.461,13.302 41.275,12.258 38.713,12.071 C38.024,8.580 36.306,5.698 33.557,3.421 Z\"></path>
\t\t\t\t\t\t\t</svg>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<img id=\"dynamic-image-upload\" ";
        // line 34
        if (($context["isHaveImage"] ?? null)) {
            yield "src=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "profileImage", [], "any", false, false, false, 34), "html", null, true);
            yield "\"";
        }
        yield ">

\t\t\t\t\t</div>
\t\t\t\t\t<div class=\"uv-image-info-brick\">
\t\t\t\t\t\t<span class=\"uv-field-info\">";
        // line 38
        yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Upload a Profile Image (100px x 100px)<br> in PNG or JPG Format");
        yield "</span>
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<!-- //Profile image -->

\t\t\t\t<!-- Field -->
\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 45
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("First Name"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[firstName]\" class=\"uv-field\" value=\"";
        // line 47
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((($context["customerDetails"] ?? null)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "firstName", [], "any", false, false, false, 47)) : (CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "firstName", [], "any", false, false, false, 47))), "html", null, true);
        yield "\" />
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->

                <!-- Field -->
\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 54
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Last Name"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[lastName]\" class=\"uv-field\" value=\"";
        // line 56
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((($context["customerDetails"] ?? null)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "lastName", [], "any", false, false, false, 56)) : (CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "lastName", [], "any", false, false, false, 56))), "html", null, true);
        yield "\" />
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->

                <!-- Field -->
\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 63
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[email]\" class=\"uv-field\" value=\"";
        // line 65
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["user"] ?? null), "email", [], "any", false, false, false, 65), "html", null, true);
        yield "\" />
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->

                <!-- Field -->
\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 72
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Contact Number"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[contactNumber]\" class=\"uv-field\" value=\"\" />
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->
\t\t\t\t
\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 80
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("GST Number"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[gstNumber]\" id=\"gstNumber\" class=\"uv-field\" value=\"\" /><br>
\t\t\t\t\t\t<span id=\"gstError\" style=\"color:red; display:none;\"></span>
\t\t\t\t\t</div>
\t\t\t\t</div>


\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 89
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("PAN Number"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<input type=\"text\" name=\"customer_form[panNumber]\" id=\"panNumber\" class=\"uv-field\" value=\"";
        // line 91
        (((CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "panNumber", [], "any", true, true, false, 91) &&  !(null === CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "panNumber", [], "any", false, false, false, 91)))) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "panNumber", [], "any", false, false, false, 91), "html", null, true)) : (yield ""));
        yield "\" /><br>
\t\t\t\t\t\t<span id=\"panError\" style=\"color:red; display:none;\"></span>

\t\t\t\t\t</div>
\t\t\t\t</div>

\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 98
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Address"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<textarea name=\"customer_form[address]\" class=\"uv-field\"></textarea>
\t\t\t\t\t</div>
\t\t\t\t</div>

                ";
        // line 104
        if ((($context["customerDetails"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["customerDetails"] ?? null), "isVerified", [], "any", false, false, false, 104))) {
            // line 105
            yield "                    <!-- Field -->
                    <div class=\"uv-element-block\">
                        <label class=\"uv-field-label\">";
            // line 107
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password"), "html", null, true);
            yield "</label>
                        <div class=\"uv-field-block\">
                            <input type=\"password\" name=\"customer_form[password][first]\" class=\"uv-field\" value=\"\" />
                        </div>
                    </div>
                    <!-- //Field -->

                    <!-- Field -->
                    <div class=\"uv-element-block\">
                        <label class=\"uv-field-label\">";
            // line 116
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Confirm Password"), "html", null, true);
            yield "</label>
                        <div class=\"uv-field-block\">
                            <input type=\"password\" name=\"customer_form[password][second]\" class=\"uv-field\" value=\"\" />
                        </div>
                    </div>
                    <!-- //Field -->
                ";
        }
        // line 123
        yield "
                <!-- Field -->
                <div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 126
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Account Status"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-element-block\">
\t\t\t\t\t\t<label>
\t\t\t\t\t\t\t<div class=\"uv-checkbox\">
\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"customer_form[isActive]\" value=\"1\">
\t\t\t\t\t\t\t\t<span class=\"uv-checkbox-view\"></span>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<span class=\"uv-checkbox-label\">";
        // line 133
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Account is Active"), "html", null, true);
        yield "</span>
\t\t\t\t\t\t</label>
\t\t\t\t\t</div>
                </div>
\t\t\t\t<!-- //Field -->

\t\t\t\t<!-- CSRF token Field -->
\t\t\t\t\t";
        // line 141
        yield "\t\t\t\t<!-- //CSRF token Field -->

\t\t\t\t<!--CTA-->
\t\t\t\t<input class=\"uv-btn\" href=\"#\" value=\"";
        // line 144
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Save Changes"), "html", null, true);
        yield "\" type=\"submit\" disabled>
\t\t\t\t<!--//CTA-->
\t\t\t</form>
\t\t\t<!--//Form-->
\t\t</div>
\t</div>
";
        yield from [];
    }

    // line 151
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_footer(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 152
        yield "\t";
        yield from $this->yieldParentBlock("footer", $context, $blocks);
        yield "
\t<script type=\"text/javascript\">
\t\t\tdocument.addEventListener('DOMContentLoaded', function () {
\t\t\tconst gstInput = document.getElementById('gstNumber');
\t\t\tconst panInput = document.getElementById('panNumber');
\t\t\tconst gstError = document.getElementById('gstError');
    \t\tconst panError = document.getElementById('panError');
\t\t\tconst submitBtn = document.querySelector('input[type=\"submit\"].uv-btn');

\t\t\tconst gstRegex = /^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}\$/;
    \t\tconst panRegex = /^[A-Z]{5}[0-9]{4}[A-Z]\$/;

\t\t\tfunction validateFields() {
\t\t\t\tconst gstVal = gstInput.value.trim();
\t\t\t\tconst panVal = panInput.value.trim();

\t\t\t\t// Find green tick icons near inputs
\t\t\t\tconst gstSuccessIcon = gstInput.parentElement.querySelector('.uv-field-success-icon');
\t\t\t\tconst panSuccessIcon = panInput.parentElement.querySelector('.uv-field-success-icon');


\t\t\t\t// GST validation
\t\t\t\tlet gstValid = true;
\t\t\t\tif (gstVal.length > 0) {
\t\t\t\t\tif (gstVal.length !== 15) {
\t\t\t\t\t\tgstError.innerText = \"GST must be exactly 15 characters.\";
\t\t\t\t\t\tgstError.style.display = 'inline';
\t\t\t\t\t\tgstValid = false;
\t\t\t\t\t} else if (!gstRegex.test(gstVal)) {
\t\t\t\t\t\tgstError.innerText = \"GST format is invalid (e.g., 22ABCDE1234F1Z5).\";
\t\t\t\t\t\tgstError.style.display = 'inline';
\t\t\t\t\t\tgstValid = false;
\t\t\t\t\t} else {
\t\t\t\t\t\tgstError.style.display = 'none';
\t\t\t\t\t}
\t\t\t\t} else {
\t\t\t\t\tgstError.style.display = 'none';
\t\t\t\t}
\t\t\t\t// Show/hide GST success icon
\t\t\t\tif (gstSuccessIcon) {
\t\t\t\t\tgstSuccessIcon.style.display = gstValid && gstVal.length > 0 ? '' : 'none';
\t\t\t\t}

\t\t\t\t// PAN validation
\t\t\t\tlet panValid = true;
\t\t\t\tif (panVal.length > 0) {
\t\t\t\t\tif (panVal.length !== 10) {
\t\t\t\t\t\tpanError.innerText = \"PAN must be exactly 10 characters.\";
\t\t\t\t\t\tpanError.style.display = 'inline';
\t\t\t\t\t\tpanValid = false;
\t\t\t\t\t} else if (!panRegex.test(panVal)) {
\t\t\t\t\t\tpanError.innerText = \"PAN format is invalid (e.g., ABCDE1234F).\";
\t\t\t\t\t\tpanError.style.display = 'inline';
\t\t\t\t\t\tpanValid = false;
\t\t\t\t\t} else {
\t\t\t\t\t\tpanError.style.display = 'none';
\t\t\t\t\t}
\t\t\t\t} else {
\t\t\t\t\tpanError.style.display = 'none';
\t\t\t\t}

\t\t\t\t// Show/hide PAN success icon
\t\t\t\tif (panSuccessIcon) {
\t\t\t\t\tpanSuccessIcon.style.display = panValid && panVal.length > 0 ? '' : 'none';
\t\t\t\t}

\t\t\t\t// Enable submit only if both valid
\t\t\t\tsubmitBtn.disabled = !(gstValid && panValid);
\t\t\t}

\t\t\tgstInput.addEventListener('input', validateFields);
\t\t\tpanInput.addEventListener('input', validateFields);

\t\t\t// Run once on page load in case values pre-filled
\t\t\tvalidateFields();
\t\t});

\t\t\$(function () {
\t\t\tvar CustomerModel = Backbone.Model.extend({
\t\t\t\tvalidation: {
\t\t\t\t\t'customer_form[firstName]': [{
                        required: true,
                        msg: '";
        // line 234
        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-z][A-Za-z]*[\\sA-Za-z]*\$/,
                        msg: '";
        // line 237
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field must have characters only"), "html", null, true);
        yield "'
                    },{
                        maxLength:40,
                        msg: '";
        // line 240
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Maximum character length is 40"), "html", null, true);
        yield "'
                    }],
\t\t\t\t\t'customer_form[lastName]': function(value) {
                        if(value != undefined && value !== '') {
                            [{
                                pattern: /^[A-Za-z][A-Za-z]*[\\sA-Za-z]*\$/,
                                msg: '";
        // line 246
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field must have characters only"), "html", null, true);
        yield "'
                            },{
                                maxLength:40,
                                msg: '";
        // line 249
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Maximum character length is 40"), "html", null, true);
        yield "'
                            }]
                        }
                    },
                    'customer_form[email]': [{
                        required: true,
                        msg: '";
        // line 255
        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 258
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email address is invalid"), "html", null, true);
        yield "'
                    }],
                    'customer_form[contactNumber]': function(value) {
                        if(value != undefined && value !== '') {
                            if(!value.match('^\\\\s*(?:\\\\+?(\\\\d{1,3}))?[-. (]*(\\\\d{3})[-. )]*(\\\\d{3})[-. ]*(\\\\d{4})(?: *x(\\\\d+))?\\\\s*\$'))
                                return '";
        // line 263
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Contact number is invalid"), "html", null, true);
        yield "';
                        }
                    },
\t\t\t\t\t'customer_form[password][first]' : function(value) {
                        if(value != undefined && value !== '') {
                            if(value.length < 8)
                               return '";
        // line 269
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Password must contains 8 Characters"), "html", null, true);
        yield "';
                        }
                    },
                    'customer_form[password][second]': {
                        equalTo: 'customer_form[password][first]',
                        msg: '";
        // line 274
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("The passwords does not match"), "html", null, true);
        yield "'
                    }
\t\t\t\t}
\t\t\t});

\t\t\tvar CustomerForm = Backbone.View.extend({
\t\t\t\tevents : {
\t\t\t\t\t'click .uv-btn' : \"saveCustomer\",
\t\t\t\t\t'blur input, textarea': 'formChanegd'
\t\t\t\t},
\t\t\t\tinitialize : function() {
\t\t\t\t\tBackbone.Validation.bind(this);
\t\t\t\t\tvar jsonContext = JSON.parse('";
        // line 286
        yield ($context["errors"] ?? null);
        yield "');
\t\t    \t\tfor (var field in jsonContext) {
\t\t    \t\t\tif(field == 'first') {
                            Backbone.Validation.callbacks.invalid(this, \"customer_form[password][\" + field + \"]\", jsonContext[field], 'input');
                        } else {
\t\t    \t\t\t    Backbone.Validation.callbacks.invalid(this, \"customer_form[\" + field + \"]\", jsonContext[field], 'input');
                        }
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tformChanegd: function(e) {
\t\t\t    \tvar fieldName = Backbone.\$(e.currentTarget).attr('name');
                    if(fieldName == 'customer_form[password][second]') {
                        if(\$(\"input[name='customer_form[password][first]']\").val().length) {
                            this.model.set(fieldName, Backbone.\$(e.currentTarget).val())
                            this.model.isValid([fieldName])
                        } else {
                            if(\$(\"input[name='customer_form[password][second]']\").val().length) {
\t\t    \t\t\t        this.model.set(fieldName, Backbone.\$(e.currentTarget).val())
                                this.model.isValid([fieldName])
                            } else {
\t\t    \t\t\t        Backbone.Validation.callbacks.valid(this, fieldName, 'input');
                            }
                        }
                    } else {
                        this.model.set(fieldName, Backbone.\$(e.currentTarget).val())
                        this.model.isValid([fieldName])
                        if(fieldName == 'customer_form[password][first]' && !\$(\"input[name='customer_form[password][second]']\").val().length) {
\t\t    \t\t\t    Backbone.Validation.callbacks.valid(this, 'customer_form[password][second]', 'input');
                        }
                    }
\t\t\t    },
\t\t\t\tsaveCustomer : function (e) {
\t\t\t\t\te.preventDefault();
\t\t\t        this.model.set(this.\$el.serializeObject());
\t\t\t        if(this.model.isValid(true)) {
\t\t\t\t\t\tthis.\$el.find('.uv-btn').attr('disabled', 'disabled');
\t\t\t            this.\$el.submit();
\t\t\t        }
\t\t\t\t}
\t\t\t});

\t\t\tcustomerForm = new CustomerForm({
\t\t\t\tel : \$(\"#customer-form\"),
\t\t\t\tmodel : new CustomerModel()
\t\t\t});
\t\t});
\t</script>
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  497 => 286,  482 => 274,  474 => 269,  465 => 263,  457 => 258,  451 => 255,  442 => 249,  436 => 246,  427 => 240,  421 => 237,  415 => 234,  329 => 152,  322 => 151,  310 => 144,  305 => 141,  295 => 133,  285 => 126,  280 => 123,  270 => 116,  258 => 107,  254 => 105,  252 => 104,  243 => 98,  233 => 91,  228 => 89,  216 => 80,  205 => 72,  195 => 65,  190 => 63,  180 => 56,  175 => 54,  165 => 47,  160 => 45,  150 => 38,  139 => 34,  122 => 27,  120 => 26,  114 => 22,  112 => 21,  109 => 20,  103 => 18,  97 => 16,  95 => 15,  88 => 13,  83 => 11,  80 => 10,  77 => 9,  74 => 8,  71 => 6,  64 => 5,  53 => 3,  42 => 1,);
    }

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