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

/* pages/admin/assetdefinition/fields_display.html.twig */
class __TwigTemplate_213de88e24c71951ae6a234062bbfaa3 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
        $context["all_fields"] = (((array_key_exists("all_fields", $context) &&  !(null === $context["all_fields"]))) ? ($context["all_fields"]) : ([]));
        // line 34
        yield "
";
        // line 35
        $context["params"] = [];
        // line 37
        $context["params"] = Twig\Extension\CoreExtension::merge(($context["params"] ?? null), ["candel" => false]);
        // line 39
        $context["params"] = Twig\Extension\CoreExtension::merge(($context["params"] ?? null), ["formfooter" => false]);
        // line 40
        $context["rand"] = ((array_key_exists("rand", $context)) ? (Twig\Extension\CoreExtension::default(($context["rand"] ?? null), Twig\Extension\CoreExtension::random($this->env->getCharset()))) : (Twig\Extension\CoreExtension::random($this->env->getCharset())));
        // line 41
        yield "
<div class=\"card-body d-flex flex-wrap p-0 m-n2 mb-n5\">
    <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\">
                    <form id=\"main-form\" name=\"asset_form\" method=\"post\" action=\"";
        // line 47
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Glpi\Application\View\Extension\ItemtypeExtension']->getItemtypeFormPath("Glpi\\Asset\\AssetDefinition"), "html", null, true);
        yield "\" enctype=\"multipart/form-data\" data-submit-once=\"\">
                        ";
        // line 48
        yield Twig\Extension\CoreExtension::include($this->env, $context, "components/form/viewsubitem.html.twig", Twig\Extension\CoreExtension::merge(($context["custom_field_form_params"] ?? null), ["cancreate" => false, "rand" =>         // line 50
($context["rand"] ?? null), "modal_title" => __("New field")]), false);
        // line 52
        yield "
                        <div id=\"sortable-fields-container\" class=\"card-body d-flex flex-wrap p-0\"></div>
                        <script>
                            window.Vue.createApp(window.Vue.components['CustomObject/FieldPreview/FieldDisplay'].component, {
                                items_id: ";
        // line 56
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "getID", [], "method", false, false, false, 56), "html", null, true);
        yield ",
                                toolbar_el: '#sortable-fields-toolbar',
                                all_fields: ";
        // line 58
        yield json_encode(($context["all_fields"] ?? null));
        yield ",
                                fields_display: ";
        // line 59
        yield json_encode(((array_key_exists("fields_display", $context)) ? (Twig\Extension\CoreExtension::default(($context["fields_display"] ?? null), [])) : ([])));
        yield ",
                                add_edit_fn: 'viewAddEditSubItem";
        // line 60
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["rand"] ?? null), "html", null, true);
        yield "',
                                can_create_fields: ";
        // line 61
        yield (((($tmp = ((array_key_exists("can_create_fields", $context)) ? (Twig\Extension\CoreExtension::default(($context["can_create_fields"] ?? null), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("true") : ("false"));
        yield ",
                            }).mount('#sortable-fields-container');
                        </script>
                        <div class=\"w-100 px-2\">
                            ";
        // line 65
        if (( !array_key_exists("no_form_buttons", $context) || (($context["no_form_buttons"] ?? null) == false))) {
            // line 66
            yield "                                ";
            yield Twig\Extension\CoreExtension::include($this->env, $context, "components/form/buttons.html.twig");
            yield "
                            ";
        }
        // line 68
        yield "                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "pages/admin/assetdefinition/fields_display.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  111 => 68,  105 => 66,  103 => 65,  96 => 61,  92 => 60,  88 => 59,  84 => 58,  79 => 56,  73 => 52,  71 => 50,  70 => 48,  66 => 47,  58 => 41,  56 => 40,  54 => 39,  52 => 37,  50 => 35,  47 => 34,  45 => 33,  42 => 32,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "pages/admin/assetdefinition/fields_display.html.twig", "/home/tisoluci/public_html/crpamplona/templates/pages/admin/assetdefinition/fields_display.html.twig");
    }
}
