<?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/checkbox_matrix.html.twig */
class __TwigTemplate_7524d23aaa55055903c27112489c7b78 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 "
<div class=\"mx-n2 mb-4\">
   <table class=\"table table-hover card-table\">
      <thead>
         <tr class=\"border-top\">
            <th colspan=\"";
        // line 37
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["number_columns"] ?? null), "html", null, true);
        yield "\">
               <h4>";
        // line 38
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["title"] ?? null), "html", null, true);
        yield "</h4>
            </th>
         </tr>
         <tr>
            <th>";
        // line 42
        yield (($_v0 = ($context["param"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0["first_cell"] ?? null) : null);
        yield "</th>
            ";
        // line 43
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["columns"] ?? null));
        foreach ($context['_seq'] as $context["col_name"] => $context["column"]) {
            // line 44
            yield "               ";
            $context["col_id"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [((("col_label_" . $context["col_name"]) . "_") . (($_v1 = ($context["param"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1["rand"] ?? null) : null))]);
            // line 45
            yield "               <th id=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["col_id"] ?? null), "html", null, true);
            yield "\">
                  ";
            // line 46
            if ((($tmp =  !is_iterable($context["column"])) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 47
                yield "                     ";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["column"], "html", null, true);
                yield "
                  ";
            } else {
                // line 49
                yield "                     ";
                if ((CoreExtension::getAttribute($this->env, $this->source, $context["column"], "short", [], "array", true, true, false, 49) && CoreExtension::getAttribute($this->env, $this->source, $context["column"], "long", [], "array", true, true, false, 49))) {
                    // line 50
                    yield "                        ";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v2 = $context["column"]) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["short"] ?? null) : null), "html", null, true);
                    yield "
                        ";
                    // line 51
                    $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::showToolTip", [(($_v3 = $context["column"]) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3["long"] ?? null) : null), ["applyto" => ($context["col_id"] ?? null)]]);
                    // line 52
                    yield "                     ";
                } else {
                    // line 53
                    yield "                        ";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v4 = $context["column"]) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4["label"] ?? null) : null), "html", null, true);
                    yield "
                     ";
                }
                // line 55
                yield "                  ";
            }
            // line 56
            yield "               </th>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['col_name'], $context['column'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 58
        yield "
            ";
        // line 59
        if ((($tmp = (($_v5 = ($context["param"] ?? null)) && is_array($_v5) || $_v5 instanceof ArrayAccess ? ($_v5["row_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 60
            yield "               ";
            $context["col_id"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [("col_of_table_" . (($_v6 = ($context["param"] ?? null)) && is_array($_v6) || $_v6 instanceof ArrayAccess ? ($_v6["rand"] ?? null) : null))]);
            // line 61
            yield "               <th id=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["col_id"] ?? null), "html", null, true);
            yield "\">
                  ";
            // line 62
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(__("Select/unselect all"), "html", null, true);
            yield "
               </th>
            ";
        }
        // line 65
        yield "         </tr>
      </thead>
      <tbody>
         ";
        // line 68
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["rows"] ?? null));
        foreach ($context['_seq'] as $context["row_name"] => $context["row"]) {
            // line 69
            yield "            <tr>
               ";
            // line 70
            if ((($tmp =  !is_iterable($context["row"])) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 71
                yield "                  <td colspan=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["number_columns"] ?? null), "html", null, true);
                yield "\">";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["row"], "html", null, true);
                yield "</td>
               ";
            } else {
                // line 73
                yield "                  ";
                $context["row_id"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [((("row_label_" . $context["row_name"]) . "_") . (($_v7 = ($context["param"] ?? null)) && is_array($_v7) || $_v7 instanceof ArrayAccess ? ($_v7["rand"] ?? null) : null))]);
                // line 74
                yield "                  <td class=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v8 = $context["row"]) && is_array($_v8) || $_v8 instanceof ArrayAccess ? ($_v8["class"] ?? null) : null), "html", null, true);
                yield "\" id=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["row_id"] ?? null), "html", null, true);
                yield "\">
                     ";
                // line 75
                yield (((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "label", [], "array", true, true, false, 75) &&  !(null === (($_v9 = $context["row"]) && is_array($_v9) || $_v9 instanceof ArrayAccess ? ($_v9["label"] ?? null) : null)))) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v10 = $context["row"]) && is_array($_v10) || $_v10 instanceof ArrayAccess ? ($_v10["label"] ?? null) : null), "html", null, true)) : ("&nbsp;"));
                yield "
                  </td>

                  ";
                // line 78
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(($context["columns"] ?? null));
                foreach ($context['_seq'] as $context["col_name"] => $context["column"]) {
                    // line 79
                    yield "                     ";
                    $context["content"] = (($_v11 = (($_v12 = $context["row"]) && is_array($_v12) || $_v12 instanceof ArrayAccess ? ($_v12["columns"] ?? null) : null)) && is_array($_v11) || $_v11 instanceof ArrayAccess ? ($_v11[$context["col_name"]] ?? null) : null);
                    // line 80
                    yield "                     <td>
                        ";
                    // line 81
                    if ((is_iterable(($context["content"] ?? null)) && CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "checked", [], "array", true, true, false, 81))) {
                        // line 82
                        yield "                           ";
                        if ((($tmp =  !CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "readonly", [], "array", true, true, false, 82)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                            // line 83
                            yield "                              ";
                            $context["content"] = Twig\Extension\CoreExtension::merge(($context["content"] ?? null), ["readonly" => false]);
                            // line 84
                            yield "                           ";
                        }
                        // line 85
                        yield "                           ";
                        $context["content"] = Twig\Extension\CoreExtension::merge(($context["content"] ?? null), ["name" => (((                        // line 86
$context["row_name"] . "[") . $context["col_name"]) . "]"), "id" => $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [((((("cb_" .                         // line 87
$context["row_name"]) . "_") . $context["col_name"]) . "_") . (($_v13 = ($context["param"] ?? null)) && is_array($_v13) || $_v13 instanceof ArrayAccess ? ($_v13["rand"] ?? null) : null))])]);
                        // line 89
                        yield "                           ";
                        $context["massive_tags"] = [];
                        // line 90
                        yield "                           ";
                        if ((($tmp = (($_v14 = ($context["param"] ?? null)) && is_array($_v14) || $_v14 instanceof ArrayAccess ? ($_v14["row_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                            // line 91
                            yield "                              ";
                            $context["massive_tags"] = Twig\Extension\CoreExtension::merge(($context["massive_tags"] ?? null), [((("row_" .                             // line 92
$context["row_name"]) . "_") . (($_v15 = ($context["param"] ?? null)) && is_array($_v15) || $_v15 instanceof ArrayAccess ? ($_v15["rand"] ?? null) : null))]);
                            // line 94
                            yield "                           ";
                        }
                        // line 95
                        yield "                           ";
                        if ((($tmp = (($_v16 = ($context["param"] ?? null)) && is_array($_v16) || $_v16 instanceof ArrayAccess ? ($_v16["col_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                            // line 96
                            yield "                              ";
                            $context["massive_tags"] = Twig\Extension\CoreExtension::merge(($context["massive_tags"] ?? null), [((("col_" .                             // line 97
$context["col_name"]) . "_") . (($_v17 = ($context["param"] ?? null)) && is_array($_v17) || $_v17 instanceof ArrayAccess ? ($_v17["rand"] ?? null) : null))]);
                            // line 99
                            yield "                           ";
                        }
                        // line 100
                        yield "                           ";
                        if (((($_v18 = ($context["param"] ?? null)) && is_array($_v18) || $_v18 instanceof ArrayAccess ? ($_v18["row_check_all"] ?? null) : null) && (($_v19 = ($context["param"] ?? null)) && is_array($_v19) || $_v19 instanceof ArrayAccess ? ($_v19["col_check_all"] ?? null) : null))) {
                            // line 101
                            yield "                              ";
                            $context["massive_tags"] = Twig\Extension\CoreExtension::merge(($context["massive_tags"] ?? null), [("table_" . (($_v20 =                             // line 102
($context["param"] ?? null)) && is_array($_v20) || $_v20 instanceof ArrayAccess ? ($_v20["rand"] ?? null) : null))]);
                            // line 104
                            yield "                           ";
                        }
                        // line 105
                        yield "                           ";
                        $context["content"] = Twig\Extension\CoreExtension::merge(($context["content"] ?? null), ["massive_tags" =>                         // line 106
($context["massive_tags"] ?? null)]);
                        // line 108
                        yield "                           ";
                        $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::showCheckbox", [($context["content"] ?? null)]);
                        // line 109
                        yield "
                        ";
                    } else {
                        // line 111
                        yield "                           ";
                        if ((($tmp =  !is_iterable(($context["content"] ?? null))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                            // line 112
                            yield "                              ";
                            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["content"] ?? null), "html", null, true);
                            yield "
                           ";
                        }
                        // line 114
                        yield "                        ";
                    }
                    // line 115
                    yield "                     </td>
                  ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['col_name'], $context['column'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 117
                yield "
                  ";
                // line 118
                if ((($tmp = (($_v21 = ($context["param"] ?? null)) && is_array($_v21) || $_v21 instanceof ArrayAccess ? ($_v21["row_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 119
                    yield "                     <td>
                        ";
                    // line 120
                    $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::showCheckbox", [["title" => __("Check/uncheck all"), "criterion" => ["tag_for_massive" => ((("row_" .                     // line 123
$context["row_name"]) . "_") . (($_v22 = ($context["param"] ?? null)) && is_array($_v22) || $_v22 instanceof ArrayAccess ? ($_v22["rand"] ?? null) : null))], "massive_tags" => ("table_" . (($_v23 =                     // line 125
($context["param"] ?? null)) && is_array($_v23) || $_v23 instanceof ArrayAccess ? ($_v23["rand"] ?? null) : null)), "id" => $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [((("cb_checkall_row_" .                     // line 126
$context["row_name"]) . "_") . (($_v24 = ($context["param"] ?? null)) && is_array($_v24) || $_v24 instanceof ArrayAccess ? ($_v24["rand"] ?? null) : null))]), "checked" => ((($_v25 = (($_v26 =                     // line 127
($context["nb_cb_per_row"] ?? null)) && is_array($_v26) || $_v26 instanceof ArrayAccess ? ($_v26[$context["row_name"]] ?? null) : null)) && is_array($_v25) || $_v25 instanceof ArrayAccess ? ($_v25["checked"] ?? null) : null) >= (($_v27 = (($_v28 = ($context["nb_cb_per_row"] ?? null)) && is_array($_v28) || $_v28 instanceof ArrayAccess ? ($_v28[$context["row_name"]] ?? null) : null)) && is_array($_v27) || $_v27 instanceof ArrayAccess ? ($_v27["total"] ?? null) : null))]]);
                    // line 129
                    yield "                     </td>
                  ";
                }
                // line 131
                yield "               ";
            }
            // line 132
            yield "            </tr>
         ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['row_name'], $context['row'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 134
        yield "
         ";
        // line 135
        if ((($tmp = (($_v29 = ($context["param"] ?? null)) && is_array($_v29) || $_v29 instanceof ArrayAccess ? ($_v29["col_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 136
            yield "            <tr>
               <td>";
            // line 137
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(__("Select/unselect all"), "html", null, true);
            yield "</td>
               ";
            // line 138
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["columns"] ?? null));
            foreach ($context['_seq'] as $context["col_name"] => $context["column"]) {
                // line 139
                yield "                  <td>
                     ";
                // line 140
                if (((($_v30 = (($_v31 = ($context["nb_cb_per_col"] ?? null)) && is_array($_v31) || $_v31 instanceof ArrayAccess ? ($_v31[$context["col_name"]] ?? null) : null)) && is_array($_v30) || $_v30 instanceof ArrayAccess ? ($_v30["total"] ?? null) : null) >= 2)) {
                    // line 141
                    yield "                        ";
                    $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::showCheckbox", [["title" => __("Check/uncheck all"), "criterion" => ["tag_for_massive" => ((("col_" .                     // line 144
$context["col_name"]) . "_") . (($_v32 = ($context["param"] ?? null)) && is_array($_v32) || $_v32 instanceof ArrayAccess ? ($_v32["rand"] ?? null) : null))], "massive_tags" => ("table_" . (($_v33 =                     // line 146
($context["param"] ?? null)) && is_array($_v33) || $_v33 instanceof ArrayAccess ? ($_v33["rand"] ?? null) : null)), "id" => $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [(("cb_checkall_col_" .                     // line 147
$context["col_name"]) . (($_v34 = ($context["param"] ?? null)) && is_array($_v34) || $_v34 instanceof ArrayAccess ? ($_v34["rand"] ?? null) : null))]), "checked" => ((($_v35 = (($_v36 =                     // line 148
($context["nb_cb_per_col"] ?? null)) && is_array($_v36) || $_v36 instanceof ArrayAccess ? ($_v36[$context["col_name"]] ?? null) : null)) && is_array($_v35) || $_v35 instanceof ArrayAccess ? ($_v35["checked"] ?? null) : null) >= (($_v37 = (($_v38 = ($context["nb_cb_per_col"] ?? null)) && is_array($_v38) || $_v38 instanceof ArrayAccess ? ($_v38[$context["col_name"]] ?? null) : null)) && is_array($_v37) || $_v37 instanceof ArrayAccess ? ($_v37["total"] ?? null) : null))]]);
                    // line 150
                    yield "                     ";
                }
                // line 151
                yield "                  </td>
               ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['col_name'], $context['column'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 153
            yield "
               ";
            // line 154
            if ((($tmp = (($_v39 = ($context["param"] ?? null)) && is_array($_v39) || $_v39 instanceof ArrayAccess ? ($_v39["row_check_all"] ?? null) : null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 155
                yield "                  <td>
                     ";
                // line 156
                $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::showCheckbox", [["title" => __("Check/uncheck all"), "criterion" => ["tag_for_massive" => ("table_" . (($_v40 =                 // line 159
($context["param"] ?? null)) && is_array($_v40) || $_v40 instanceof ArrayAccess ? ($_v40["rand"] ?? null) : null))], "massive_tags" => "", "id" => $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::cleanId", [("cb_checkall_table_" . (($_v41 =                 // line 162
($context["param"] ?? null)) && is_array($_v41) || $_v41 instanceof ArrayAccess ? ($_v41["rand"] ?? null) : null))])]]);
                // line 164
                yield "                  </td>
               ";
            }
            // line 166
            yield "            </tr>
         ";
        }
        // line 168
        yield "      </tbody>
   </table>
</div>
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  345 => 168,  341 => 166,  337 => 164,  335 => 162,  334 => 159,  333 => 156,  330 => 155,  328 => 154,  325 => 153,  318 => 151,  315 => 150,  313 => 148,  312 => 147,  311 => 146,  310 => 144,  308 => 141,  306 => 140,  303 => 139,  299 => 138,  295 => 137,  292 => 136,  290 => 135,  287 => 134,  280 => 132,  277 => 131,  273 => 129,  271 => 127,  270 => 126,  269 => 125,  268 => 123,  267 => 120,  264 => 119,  262 => 118,  259 => 117,  252 => 115,  249 => 114,  243 => 112,  240 => 111,  236 => 109,  233 => 108,  231 => 106,  229 => 105,  226 => 104,  224 => 102,  222 => 101,  219 => 100,  216 => 99,  214 => 97,  212 => 96,  209 => 95,  206 => 94,  204 => 92,  202 => 91,  199 => 90,  196 => 89,  194 => 87,  193 => 86,  191 => 85,  188 => 84,  185 => 83,  182 => 82,  180 => 81,  177 => 80,  174 => 79,  170 => 78,  164 => 75,  157 => 74,  154 => 73,  146 => 71,  144 => 70,  141 => 69,  137 => 68,  132 => 65,  126 => 62,  121 => 61,  118 => 60,  116 => 59,  113 => 58,  106 => 56,  103 => 55,  97 => 53,  94 => 52,  92 => 51,  87 => 50,  84 => 49,  78 => 47,  76 => 46,  71 => 45,  68 => 44,  64 => 43,  60 => 42,  53 => 38,  49 => 37,  42 => 32,);
    }

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