<?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;

/* components/form/networkname.html.twig */
class __TwigTemplate_370617b4f3685e8008a6443901425e68 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;
        // line 32
        yield "
";
        // line 33
        $macros["fields"] = $this->macros["fields"] = $this->load("components/form/fields_macros.html.twig", 33)->unwrap();
        // line 34
        yield "
";
        // line 35
        $context["no_header"] = ((array_key_exists("no_header", $context)) ? (Twig\Extension\CoreExtension::default(($context["no_header"] ?? null), ( !CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isNewItem", [], "method", false, false, false, 35) &&  !((CoreExtension::getAttribute($this->env, $this->source, ($context["_get"] ?? null), "_in_modal", [], "any", true, true, false, 35)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["_get"] ?? null), "_in_modal", [], "any", false, false, false, 35), false)) : (false))))) : (( !CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isNewItem", [], "method", false, false, false, 35) &&  !((CoreExtension::getAttribute($this->env, $this->source, ($context["_get"] ?? null), "_in_modal", [], "any", true, true, false, 35)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["_get"] ?? null), "_in_modal", [], "any", false, false, false, 35), false)) : (false)))));
        // line 36
        $context["bg"] = "";
        // line 37
        if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isDeleted", [], "method", false, false, false, 37)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 38
            yield "   ";
            $context["bg"] = "asset-deleted";
        }
        // line 40
        yield "
<div class=\"asset ";
        // line 41
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["bg"] ?? null), "html", null, true);
        yield "\">
   ";
        // line 42
        yield Twig\Extension\CoreExtension::include($this->env, $context, "components/form/header.html.twig", ["in_twig" => true]);
        yield "

   ";
        // line 44
        $context["params"] = (((array_key_exists("params", $context) &&  !(null === $context["params"]))) ? ($context["params"]) : ([]));
        // line 45
        yield "   ";
        $context["no_header"] = true;
        // line 46
        yield "   ";
        $context["field_options"] = ["locked_fields" => CoreExtension::getAttribute($this->env, $this->source,         // line 47
($context["item"] ?? null), "getLockedFields", [], "method", false, false, false, 47)];
        // line 49
        yield "
   <div class=\"card-body d-flex flex-wrap\">
      <div class=\"col-12 col-xxl-12 flex-column\">
         <div class=\"d-flex flex-row flex-wrap flex-xl-nowrap\">
            <div class=\"row flex-row align-items-start flex-grow-1\">
               <div class=\"row flex-row\">
                  ";
        // line 55
        $context["field_options"] = Twig\Extension\CoreExtension::merge(($context["field_options"] ?? null), ($context["params"] ?? null));
        // line 56
        yield "                  ";
        $context["session_get_plural"] = Session::getPluralNumber();
        // line 57
        yield "                  ";
        $context["rand"] = Twig\Extension\CoreExtension::random($this->env->getCharset());
        // line 58
        yield "
                  ";
        // line 59
        if ((($tmp = ($context["ID"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 60
            yield "                     <input type=\"hidden\" name=\"itemtype\" value=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v0 = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "fields", [], "any", false, false, false, 60)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0["itemtype"] ?? null) : null), "html", null, true);
            yield "\">
                     <input type=\"hidden\" name=\"items_id\" value=\"";
            // line 61
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v1 = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "fields", [], "any", false, false, false, 61)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1["items_id"] ?? null) : null), "html", null, true);
            yield "\">
                  ";
        }
        // line 63
        yield "
                  ";
        // line 64
        yield $macros["fields"]->getTemplateForMacro("macro_textField", $context, 64, $this->getSourceContext())->macro_textField(...["name", (($_v2 = CoreExtension::getAttribute($this->env, $this->source,         // line 66
($context["item"] ?? null), "fields", [], "any", false, false, false, 66)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["name"] ?? null) : null), __("Name"),         // line 68
($context["field_options"] ?? null)]);
        // line 69
        yield "

                  ";
        // line 71
        if ((($tmp = ($context["display_dissociate_btn"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 72
            yield "                     ";
            $context["unaffect_btn"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
                // line 73
                yield "                        <a class=\"btn btn-sm btn-outline-danger\"
                        onclick=\" submitGetLink(\x27";
                // line 74
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "getFormURL", [], "any", false, false, false, 74), "html", null, true);
                yield "\x27, {\x27unaffect\x27: \x27unaffect\x27, \x27id\x27: \x27";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["ID"] ?? null), "html", null, true);
                yield "\x27, \x27_glpi_csrf_token\x27: \x27";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Session::getNewCSRFToken(), "html", null, true);
                yield "\x27, \x27_glpi_simple_form\x27: \x271\x27});\">
                           <span class=\"fas fa-unlink \" title=";
                // line 75
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(__("Dissociate"), "html", null, true);
                yield ">
                              <span class=\"sr-only\">";
                // line 76
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(__("Dissociate"), "html", null, true);
                yield "</span>
                           </span>
                        </a>

                     ";
                yield from [];
            })())) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 81
            yield "
                     ";
            // line 82
            yield $macros["fields"]->getTemplateForMacro("macro_htmlField", $context, 82, $this->getSourceContext())->macro_htmlField(...["_virtual",             // line 84
($context["display_recursive_items_link"] ?? null),             // line 85
($context["recursive_items_type_data"] ?? null), Twig\Extension\CoreExtension::merge(            // line 86
($context["field_options"] ?? null), ["add_field_html" =>             // line 87
($context["unaffect_btn"] ?? null)])]);
            // line 89
            yield "
                  ";
        }
        // line 91
        yield "


                  ";
        // line 94
        $context["table_from_foreignkey"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("getTableNameForForeignKeyField", ["fqdns_id"]);
        // line 95
        yield "                  ";
        $context["table_from_itemtype"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("getItemTypeForTable", [($context["table_from_foreignkey"] ?? null)]);
        // line 96
        yield "                  ";
        $context["fqdn_label"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("FQDN::getTypeName", [0]);
        // line 97
        yield "                  ";
        yield $macros["fields"]->getTemplateForMacro("macro_dropdownField", $context, 97, $this->getSourceContext())->macro_dropdownField(...[        // line 98
($context["table_from_itemtype"] ?? null), "fqdns_id", (($_v3 = CoreExtension::getAttribute($this->env, $this->source,         // line 100
($context["item"] ?? null), "fields", [], "any", false, false, false, 100)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3["fqdns_id"] ?? null) : null), $this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeName("FQDN"), Twig\Extension\CoreExtension::merge(        // line 102
($context["field_options"] ?? null), ["entity" => CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "getEntityID", [], "method", false, false, false, 102), "displaywith" => ["view"]])]);
        // line 103
        yield "

                  ";
        // line 105
        yield $macros["fields"]->getTemplateForMacro("macro_textareaField", $context, 105, $this->getSourceContext())->macro_textareaField(...["comment", (($_v4 = CoreExtension::getAttribute($this->env, $this->source,         // line 107
($context["item"] ?? null), "fields", [], "any", false, false, false, 107)) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4["comment"] ?? null) : null), _n("Comment", "Comments", Session::getPluralNumber()),         // line 109
($context["field_options"] ?? null)]);
        // line 110
        yield "


                  ";
        // line 113
        $context["ipnetwork_label"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("IPNetwork::getTypeName", [($context["session_get_plural"] ?? null)]);
        // line 114
        yield "                  ";
        $context["span_for_ajax"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
            // line 115
            yield "                     <span id=\x27show_ipnetwork_";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["rand"] ?? null), "html", null, true);
            yield "\x27></span>
                  ";
            yield from [];
        })())) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 117
        yield "
                  ";
        // line 118
        yield $macros["fields"]->getTemplateForMacro("macro_dropdownField", $context, 118, $this->getSourceContext())->macro_dropdownField(...["IPNetwork", "ipnetworks_id", (($_v5 = CoreExtension::getAttribute($this->env, $this->source,         // line 121
($context["item"] ?? null), "fields", [], "any", false, false, false, 121)) && is_array($_v5) || $_v5 instanceof ArrayAccess ? ($_v5["ipnetworks_id"] ?? null) : null), $this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeName("IPNetwork", Session::getPluralNumber()), Twig\Extension\CoreExtension::merge(        // line 123
($context["field_options"] ?? null), ["entity" => CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "getEntityID", [], "method", false, false, false, 123), "rand" =>         // line 124
($context["rand"] ?? null), "value" => (($_v6 = CoreExtension::getAttribute($this->env, $this->source,         // line 125
($context["item"] ?? null), "fields", [], "any", false, false, false, 125)) && is_array($_v6) || $_v6 instanceof ArrayAccess ? ($_v6["ipnetworks_id"] ?? null) : null), "helper" => __("IP network is not included in the database. However, you can see current available networks."), "add_field_html" =>         // line 127
($context["span_for_ajax"] ?? null)])]);
        // line 129
        yield "

                  ";
        // line 131
        $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Ajax::updateItemOnSelectEvent", [("dropdown_ipnetworks_id" .         // line 132
($context["rand"] ?? null)), ("show_ipnetwork_" .         // line 133
($context["rand"] ?? null)), ($this->extensions['Glpi\Application\View\Extension\ConfigExtension']->config("root_doc") . "/ajax/dropdownShowIPNetwork.php"), ["ipnetworks_id" => "__VALUE__"]]);
        // line 139
        yield "
                  ";
        // line 140
        if ((($tmp = (($_v7 = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "fields", [], "any", false, false, false, 140)) && is_array($_v7) || $_v7 instanceof ArrayAccess ? ($_v7["ipnetworks_id"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 141
            yield "                     ";
            $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Ajax::updateItem", [("show_ipnetwork_" .             // line 142
($context["rand"] ?? null)), ($this->extensions['Glpi\Application\View\Extension\ConfigExtension']->config("root_doc") . "/ajax/dropdownShowIPNetwork.php"), ["ipnetworks_id" => (($_v8 = CoreExtension::getAttribute($this->env, $this->source,             // line 144
($context["item"] ?? null), "fields", [], "any", false, false, false, 144)) && is_array($_v8) || $_v8 instanceof ArrayAccess ? ($_v8["ipnetworks_id"] ?? null) : null)]]);
            // line 146
            yield "                  ";
        }
        // line 147
        yield "
                  ";
        // line 148
        $context["ip_label"] = $this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeName("IPAddress", Session::getPluralNumber());
        // line 149
        yield "                  ";
        $context["add_child"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("IPAddress::showAddChildButtonForItemForm", [($context["item"] ?? null), "_ipaddresses", true, false]);
        // line 150
        yield "                  ";
        $context["show_child"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("IPAddress::showChildsForItemForm", [($context["item"] ?? null), "_ipaddresses", true, false]);
        // line 151
        yield "
                  ";
        // line 152
        yield $macros["fields"]->getTemplateForMacro("macro_htmlField", $context, 152, $this->getSourceContext())->macro_htmlField(...["_vrtual",         // line 154
($context["show_child"] ?? null), (        // line 155
($context["ip_label"] ?? null) . ($context["add_child"] ?? null)),         // line 156
($context["field_options"] ?? null)]);
        // line 157
        yield "
               </div> ";
        // line 159
        yield "            </div> ";
        // line 160
        yield "         </div> ";
        // line 161
        yield "      </div> ";
        // line 162
        yield "   </div> ";
        // line 163
        yield "   ";
        yield Twig\Extension\CoreExtension::include($this->env, $context, "components/form/buttons.html.twig");
        yield "
</div>
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "components/form/networkname.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  270 => 163,  268 => 162,  266 => 161,  264 => 160,  262 => 159,  259 => 157,  257 => 156,  256 => 155,  255 => 154,  254 => 152,  251 => 151,  248 => 150,  245 => 149,  243 => 148,  240 => 147,  237 => 146,  235 => 144,  234 => 142,  232 => 141,  230 => 140,  227 => 139,  225 => 133,  224 => 132,  223 => 131,  219 => 129,  217 => 127,  216 => 125,  215 => 124,  214 => 123,  213 => 121,  212 => 118,  209 => 117,  202 => 115,  199 => 114,  197 => 113,  192 => 110,  190 => 109,  189 => 107,  188 => 105,  184 => 103,  182 => 102,  181 => 100,  180 => 98,  178 => 97,  175 => 96,  172 => 95,  170 => 94,  165 => 91,  161 => 89,  159 => 87,  158 => 86,  157 => 85,  156 => 84,  155 => 82,  152 => 81,  143 => 76,  139 => 75,  131 => 74,  128 => 73,  125 => 72,  123 => 71,  119 => 69,  117 => 68,  116 => 66,  115 => 64,  112 => 63,  107 => 61,  102 => 60,  100 => 59,  97 => 58,  94 => 57,  91 => 56,  89 => 55,  81 => 49,  79 => 47,  77 => 46,  74 => 45,  72 => 44,  67 => 42,  63 => 41,  60 => 40,  56 => 38,  54 => 37,  52 => 36,  50 => 35,  47 => 34,  45 => 33,  42 => 32,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "components/form/networkname.html.twig", "C:\\xampp\\htdocs\\itsm\\templates\\components\\form\\networkname.html.twig");
    }
}
