<?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/ticketTypeAdd.html.twig */
class __TwigTemplate_29e2cc302a01d785b1f27cc8a454e0f2 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/ticketTypeAdd.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 " 
    ";
        // line 4
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "id", [], "any", false, false, false, 4)) {
            // line 5
            yield "\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Ticket Type"), "html", null, true);
            yield "
\t";
        } else {
            // line 7
            yield "\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Ticket Type"), "html", null, true);
            yield "
\t";
        }
        yield from [];
    }

    // line 11
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_pageContent(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 12
        yield "\t<div class=\"uv-inner-section\">
        ";
        // line 14
        yield "\t\t";
        $context["asideTemplate"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\Dashboard\\AsideTemplate";
        // line 15
        yield "\t\t";
        $context["asideSidebarReference"] = "Webkul\\UVDesk\\CoreFrameworkBundle\\UIComponents\\Dashboard\\Panel\\Sidebars\\Productivity";
        // line 16
        yield "
\t\t";
        // line 17
        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, 17), "renderSidebar", [($context["asideSidebarReference"] ?? null)], "method", false, false, false, 17);
        yield "

\t\t<div class=\"uv-view ";
        // line 19
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 19), "cookies", [], "any", false, false, false, 19) && 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, 19), "cookies", [], "any", false, false, false, 19), "get", ["uv-asideView"], "method", false, false, false, 19))) {
            yield "uv-aside-view";
        }
        yield "\">
\t\t\t<h1>
\t\t\t\t";
        // line 21
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "id", [], "any", false, false, false, 21)) {
            // line 22
            yield "\t\t\t\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Edit Ticket Type"), "html", null, true);
            yield "
\t\t\t\t";
        } else {
            // line 24
            yield "\t\t\t\t\t";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Add Ticket Type"), "html", null, true);
            yield "
\t\t\t\t";
        }
        // line 26
        yield "\t\t\t</h1>
\t\t\t
\t\t\t<!--Form-->
\t\t\t<form method=\"post\" action=\"";
        // line 29
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "id", [], "any", false, false, false, 29)) {
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_update_ticket_type", ["ticketTypeId" => CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "id", [], "any", false, false, false, 29)]), "html", null, true);
        } else {
            yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("helpdesk_member_create_ticket_type");
        }
        yield "\" id=\"ticket-type-form\">
\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 32
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Code"), "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=\"code\" class=\"uv-field\" value=\"";
        // line 34
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "code", [], "any", false, false, false, 34), "html", null, true);
        yield "\" />
\t\t\t\t\t</div>
\t\t\t\t\t<span class=\"uv-field-info\">";
        // line 36
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Type code"), "html", null, true);
        yield "</span>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->

                <!-- Field: Ticket Type Visibility -->
                <div class=\"uv-element-block\">
                \t\t\t\t<label class=\"uv-field-label\">";
        // line 42
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Visibility"), "html", null, true);
        yield "</label>
                
                \t\t\t\t<div class=\"uv-element-block\" style=\"display: flex; gap: 20px; align-items: center; margin-top: 10px; flex-wrap: wrap;\">
                \t\t\t\t\t<label style=\"display: flex; align-items: center; gap: 5px;\">
                \t\t\t\t\t\t<div class=\"uv-radio\">
                \t\t\t\t\t\t\t<input type=\"radio\" name=\"visibility\" value=\"0\" ";
        // line 47
        if ((($context["type"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "visibility", [], "any", false, false, false, 47) == 0))) {
            yield "checked";
        }
        yield ">
                \t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
                \t\t\t\t\t\t</div>
                \t\t\t\t\t\t<span class=\"uv-radio-label\">";
        // line 50
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Customer"), "html", null, true);
        yield "</span>
                \t\t\t\t\t</label>
                
                \t\t\t\t\t<label style=\"display: flex; align-items: center; gap: 5px;\">
                \t\t\t\t\t\t<div class=\"uv-radio\">
                \t\t\t\t\t\t\t<input type=\"radio\" name=\"visibility\" value=\"1\" ";
        // line 55
        if ((($context["type"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "visibility", [], "any", false, false, false, 55) == 1))) {
            yield "checked";
        }
        yield ">
                \t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
                \t\t\t\t\t\t</div>
                \t\t\t\t\t\t<span class=\"uv-radio-label\">";
        // line 58
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Agent"), "html", null, true);
        yield "</span>
                \t\t\t\t\t</label>
                
                \t\t\t\t\t<label style=\"display: flex; align-items: center; gap: 5px;\">
                \t\t\t\t\t\t<div class=\"uv-radio\">
                \t\t\t\t\t\t\t<input type=\"radio\" name=\"visibility\" value=\"2\" ";
        // line 63
        if ((($context["type"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "visibility", [], "any", false, false, false, 63) == 2))) {
            yield "checked";
        }
        yield ">
                \t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
                \t\t\t\t\t\t</div>
                \t\t\t\t\t\t<span class=\"uv-radio-label\">";
        // line 66
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Both"), "html", null, true);
        yield "</span>
                \t\t\t\t\t</label>
                \t\t\t\t\t
                \t\t\t\t\t<label style=\"display: flex; align-items: center; gap: 5px;\">
\t\t\t\t\t\t\t\t\t\t<div class=\"uv-radio\">
\t\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"visibility\" value=\"3\" ";
        // line 71
        if ((($context["type"] ?? null) && (CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "visibility", [], "any", false, false, false, 71) == 3))) {
            yield "checked";
        }
        yield ">
\t\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-view\"></span>
\t\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t\t<span class=\"uv-radio-label\">";
        // line 74
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("None"), "html", null, true);
        yield "</span>
\t\t\t\t\t\t\t\t\t</label>
                \t\t\t\t</div>
                
                \t\t\t\t<span class=\"uv-field-info\">";
        // line 78
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Select who can view this Ticket Type"), "html", null, true);
        yield "</span>
                </div>

\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 83
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Description"), "html", null, true);
        yield "</label>
\t\t\t\t\t<div class=\"uv-field-block\">
\t\t\t\t\t\t<textarea name=\"description\" class=\"uv-field\">";
        // line 85
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "description", [], "any", false, false, false, 85), "html", null, true);
        yield "</textarea>
\t\t\t\t\t</div>
\t\t\t\t\t<span class=\"uv-field-info\">";
        // line 87
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Ticket Type description"), "html", null, true);
        yield "</span>
\t\t\t\t</div>
\t\t\t\t<!-- //Field -->

\t\t\t\t<!-- Field -->
                <div class=\"uv-element-block\">
\t\t\t\t\t<label class=\"uv-field-label\">";
        // line 93
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type 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=\"isActive\" ";
        // line 97
        yield (((($context["type"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["type"] ?? null), "isActive", [], "any", false, false, false, 97))) ? ("checked") : (""));
        yield ">
\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 100
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Type 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<!--CTA-->
\t\t\t\t<input class=\"uv-btn\" href=\"#\" value=\"";
        // line 107
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Save Changes"), "html", null, true);
        yield "\" type=\"submit\">
\t\t\t\t<!--//CTA-->
\t\t\t</form>
\t\t\t<!--//Form-->
\t\t</div>
\t</div>
";
        yield from [];
    }

    // line 115
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_footer(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 116
        yield "\t";
        yield from $this->yieldParentBlock("footer", $context, $blocks);
        yield "
\t
\t<script type=\"text/javascript\">
\t\t\$(function () {
\t\t\tvar TypeModel = Backbone.Model.extend({
\t\t\t\tvalidation: {
\t\t\t\t\t'code': [{
\t\t\t\t\t\trequired: true,
\t\t\t\t\t\tmsg: \"";
        // line 124
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "\"
\t\t\t\t\t}
\t\t\t\t\t,{
\t\t\t\t\t\tpattern: '^(?!.*[!@#\$%^&*()<_+])',
\t\t\t\t\t\tmsg: \"";
        // line 128
        yield "Name must have characters only";
        yield "\"
\t\t\t\t\t},
\t\t\t\t\t,{
\t\t\t\t\t\tmaxLength:200,
\t\t\t\t\t\tmsg: \"";
        // line 132
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field contain maximum 100 characters."), "html", null, true);
        yield "\"
\t\t\t\t\t}],
\t\t\t\t\t'description': [{
\t\t\t\t\t\trequired: true,
\t\t\t\t\t\tmsg: \"";
        // line 136
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field is mandatory"), "html", null, true);
        yield "\"
\t\t\t\t\t}
\t\t\t\t\t,{
\t\t\t\t\t\tmaxLength:200,
\t\t\t\t\t\tmsg: \"";
        // line 140
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("This field contain maximum 200 characters."), "html", null, true);
        yield "\"
\t\t\t\t\t}
\t\t\t\t\t],
\t\t\t\t}
\t\t\t});

\t\t\tvar TypeForm = Backbone.View.extend({
\t\t\t\tevents : {
\t\t\t\t\t'click .uv-btn' : \"saveType\",
\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 153
        yield ($context["errors"] ?? null);
        yield "');
\t\t    \t\tfor (var field in jsonContext) {
\t\t    \t\t\tBackbone.Validation.callbacks.invalid(this, field, jsonContext[field], 'input');
\t\t\t\t\t}
\t\t\t\t},
\t\t\t\tformChanegd: function(e) {
\t\t\t    \tthis.model.set(Backbone.\$(e.currentTarget).attr('name'), Backbone.\$(e.currentTarget).val())
\t\t\t    \tthis.model.isValid([Backbone.\$(e.currentTarget).attr('name')])
\t\t\t    },
\t\t\t\tsaveType : 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\ttypeForm = new TypeForm({
\t\t\t\tel : \$(\"#ticket-type-form\"),
\t\t\t\tmodel : new TypeModel()
\t\t\t});\t
\t\t});
\t</script>
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  354 => 153,  338 => 140,  331 => 136,  324 => 132,  317 => 128,  310 => 124,  298 => 116,  291 => 115,  279 => 107,  269 => 100,  263 => 97,  256 => 93,  247 => 87,  242 => 85,  237 => 83,  229 => 78,  222 => 74,  214 => 71,  206 => 66,  198 => 63,  190 => 58,  182 => 55,  174 => 50,  166 => 47,  158 => 42,  149 => 36,  144 => 34,  139 => 32,  129 => 29,  124 => 26,  118 => 24,  112 => 22,  110 => 21,  103 => 19,  98 => 17,  95 => 16,  92 => 15,  89 => 14,  86 => 12,  79 => 11,  70 => 7,  64 => 5,  62 => 4,  53 => 3,  42 => 1,);
    }

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