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

/* @KnpMenu/menu.html copy.twig */
class __TwigTemplate_6656d5e51fb2a46f1c6af1057ab94855 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 = [
            'label' => [$this, 'block_label'],
            'list' => [$this, 'block_list'],
            'spanElement' => [$this, 'block_spanElement'],
            'linkElement' => [$this, 'block_linkElement'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("knp_menu.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_label(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 4
        yield "    ";
        // line 5
        yield "    ";
        if ((($tmp =  !CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "labelAttribute", ["iconOnly"], "method", false, false, false, 5)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 6
            yield "        ";
            if ((CoreExtension::getAttribute($this->env, $this->source, ($context["options"] ?? null), "allow_safe_labels", [], "any", false, false, false, 6) && CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "getExtra", ["safe_label", false], "method", false, false, false, 6))) {
                yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "label", [], "any", false, false, false, 6));
            } else {
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "label", [], "any", false, false, false, 6)), "html", null, true);
            }
            // line 7
            yield "    ";
        }
        // line 8
        yield "    ";
        // line 9
        yield "    ";
        yield from [];
    }

    // line 16
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_list(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 17
        yield "    ";
        if (((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "hasChildren", [], "any", false, false, false, 17) &&  !(CoreExtension::getAttribute($this->env, $this->source, ($context["options"] ?? null), "depth", [], "any", false, false, false, 17) === 0)) && CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "displayChildren", [], "any", false, false, false, 17))) {
            // line 18
            yield "        ";
            $macros["͜macros"] = $this->load("knp_menu.html.twig", 18)->unwrap();
            // line 19
            yield "
        ";
            // line 20
            if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["matcher"] ?? null), "isAncestor", [($context["item"] ?? null)], "method", false, false, false, 20)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 21
                $context["listAttributes"] = Twig\Extension\CoreExtension::merge(($context["listAttributes"] ?? null), ["class" => Twig\Extension\CoreExtension::trim((((CoreExtension::getAttribute($this->env, $this->source, ($context["listAttributes"] ?? null), "class", [], "any", true, true, false, 21)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["listAttributes"] ?? null), "class", [], "any", false, false, false, 21), "")) : ("")) . " in"))]);
            }
            // line 23
            yield "        ";
            if ((($tmp =  !CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "isRoot", [], "any", false, false, false, 23)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 24
                $context["listAttributes"] = Twig\Extension\CoreExtension::merge(($context["listAttributes"] ?? null), ["class" => Twig\Extension\CoreExtension::trim((((CoreExtension::getAttribute($this->env, $this->source, ($context["listAttributes"] ?? null), "class", [], "any", true, true, false, 24)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["listAttributes"] ?? null), "class", [], "any", false, false, false, 24), "")) : ("")) . " treeview-menu"))]);
            }
            // line 25
            yield " 
        <ul";
            // line 26
            yield $macros["͜macros"]->getTemplateForMacro("macro_attributes", $context, 26, $this->getSourceContext())->macro_attributes(...[($context["listAttributes"] ?? null)]);
            yield ">
            ";
            // line 27
            yield from             $this->unwrap()->yieldBlock("children", $context, $blocks);
            yield "
        </ul>
    ";
        }
        yield from [];
    }

    // line 40
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_spanElement(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 41
        yield "    ";
        $macros["͜macros"] = $this->load("knp_menu.html.twig", 41)->unwrap();
        // line 42
        yield "    ";
        if (CoreExtension::matches("/(^|s+)header(s+|\$)/", CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "attribute", ["class"], "method", false, false, false, 42))) {
            // line 43
            yield "        ";
            yield from             $this->unwrap()->yieldBlock("label", $context, $blocks);
            yield "
    ";
        } else {
            // line 45
            yield "        <a";
            yield $macros["͜macros"]->getTemplateForMacro("macro_attributes", $context, 45, $this->getSourceContext())->macro_attributes(...[CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "labelAttributes", [], "any", false, false, false, 45)]);
            yield ">
            ";
            // line 46
            yield from             $this->unwrap()->yieldBlock("label", $context, $blocks);
            yield "
        </a>
    ";
        }
        yield from [];
    }

    // line 50
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_linkElement(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 51
        yield "    ";
        $macros["knp_menu"] = $this;
        // line 52
        yield "    ";
        if (((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 52) != "Activités par arrondissement") || ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") && (CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 52) == "Activités par arrondissement")))) {
            // line 53
            yield "    <a href=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "uri", [], "any", false, false, false, 53), "html", null, true);
            yield "\" class=\"nav-link";
            if ((CoreExtension::getAttribute($this->env, $this->source, ($context["matcher"] ?? null), "isCurrent", [($context["item"] ?? null)], "method", false, false, false, 53) != CoreExtension::getAttribute($this->env, $this->source, ($context["matcher"] ?? null), "isAncestor", [($context["item"] ?? null), 1], "method", false, false, false, 53))) {
                yield " active ";
            }
            yield "\">
        ";
            // line 54
            if ((($tmp =  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "attribute", ["icon"], "method", false, false, false, 54))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 55
                yield "            <i class=\"nav-icon fas ";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "attribute", ["icon"], "method", false, false, false, 55), "html", null, true);
                yield "\"></i>
        ";
            } else {
                // line 57
                yield "            <i class=\"nav-icon far fa-circle\"></i>
        ";
            }
            // line 59
            yield "        <p>
            ";
            // line 60
            if ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 60) == "Sensibilité par ministère")) {
                // line 61
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 62
                    yield "                    Sensibilité par entité
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 63
($context["app"] ?? null), "user", [], "any", false, false, false, 63), "direction", [], "any", false, false, false, 63)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 64
                    yield "                    Sensibilité du ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 65
($context["app"] ?? null), "user", [], "any", false, false, false, 65), "commune", [], "any", false, false, false, 65)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 66
                    yield "                    Sensibilité de la commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 68
                    yield "                    Sensibilité par commune
                ";
                }
                // line 70
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 70) == "Ministère / ODD")) {
                // line 71
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 72
                    yield "                    Structure / ODD
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 73
($context["app"] ?? null), "user", [], "any", false, false, false, 73), "direction", [], "any", false, false, false, 73)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 74
                    yield "                    Ministère / ODD
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 75
($context["app"] ?? null), "user", [], "any", false, false, false, 75), "commune", [], "any", false, false, false, 75)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 76
                    yield "                    Commune / ODD
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 78
                    yield "                    Commune / ODD
                ";
                }
                // line 80
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 80) == "Ministère / Cible")) {
                // line 81
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 82
                    yield "                    Structure / Cible
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 83
($context["app"] ?? null), "user", [], "any", false, false, false, 83), "direction", [], "any", false, false, false, 83)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 84
                    yield "                    Ministère / Cible
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 85
($context["app"] ?? null), "user", [], "any", false, false, false, 85), "commune", [], "any", false, false, false, 85)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 86
                    yield "                    Commune / Cible
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 88
                    yield "                    Commune / Cible
                ";
                }
                // line 90
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 90) == "ODD / Ministère")) {
                // line 91
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 92
                    yield "                    ODD / Structure
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 93
($context["app"] ?? null), "user", [], "any", false, false, false, 93), "direction", [], "any", false, false, false, 93)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 94
                    yield "                    ODD / Ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 95
($context["app"] ?? null), "user", [], "any", false, false, false, 95), "commune", [], "any", false, false, false, 95)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 96
                    yield "                    ODD / Commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 98
                    yield "                    ODD / Commune
                ";
                }
                // line 100
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 100) == "Activité / Ministère")) {
                // line 101
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 102
                    yield "                    Activités / Structure
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 103
($context["app"] ?? null), "user", [], "any", false, false, false, 103), "direction", [], "any", false, false, false, 103)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 104
                    yield "                    Activités / Ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 105
($context["app"] ?? null), "user", [], "any", false, false, false, 105), "commune", [], "any", false, false, false, 105)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 106
                    yield "                    Activités / Commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 108
                    yield "                    Activités / Commune
                ";
                }
                // line 110
                yield "            ";
            } else {
                // line 111
                yield "                ";
                yield from                 $this->unwrap()->yieldBlock("label", $context, $blocks);
                yield " 
            ";
            }
            // line 113
            yield "
            ";
            // line 114
            if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "hasChildren", [], "any", false, false, false, 114)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 115
                yield "                <i class=\"right fas fa-angle-left\"></i>
            ";
            }
            // line 117
            yield "        </p>
    </a>
    ";
        }
        yield from [];
    }

    // line 32
    public function macro_attributes($attributes = null, ...$varargs): string|Markup
    {
        $macros = $this->macros;
        $context = [
            "attributes" => $attributes,
            "varargs" => $varargs,
        ] + $this->env->getGlobals();

        $blocks = [];

        return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
            // line 33
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["attributes"] ?? null));
            foreach ($context['_seq'] as $context["name"] => $context["value"]) {
                // line 34
                if (( !(null === $context["value"]) &&  !($context["value"] === false))) {
                    // line 35
                    yield Twig\Extension\CoreExtension::sprintf(" %s=\"%s\"", $context["name"], ((($context["value"] === true)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["name"])) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["value"]))));
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['name'], $context['value'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            yield from [];
        })())) ? '' : new Markup($tmp, $this->env->getCharset());
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "@KnpMenu/menu.html copy.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  360 => 35,  358 => 34,  353 => 33,  341 => 32,  333 => 117,  329 => 115,  327 => 114,  324 => 113,  318 => 111,  315 => 110,  311 => 108,  307 => 106,  305 => 105,  302 => 104,  300 => 103,  297 => 102,  294 => 101,  291 => 100,  287 => 98,  283 => 96,  281 => 95,  278 => 94,  276 => 93,  273 => 92,  270 => 91,  267 => 90,  263 => 88,  259 => 86,  257 => 85,  254 => 84,  252 => 83,  249 => 82,  246 => 81,  243 => 80,  239 => 78,  235 => 76,  233 => 75,  230 => 74,  228 => 73,  225 => 72,  222 => 71,  219 => 70,  215 => 68,  211 => 66,  209 => 65,  206 => 64,  204 => 63,  201 => 62,  198 => 61,  196 => 60,  193 => 59,  189 => 57,  183 => 55,  181 => 54,  172 => 53,  169 => 52,  166 => 51,  159 => 50,  150 => 46,  145 => 45,  139 => 43,  136 => 42,  133 => 41,  126 => 40,  117 => 27,  113 => 26,  110 => 25,  107 => 24,  104 => 23,  101 => 21,  99 => 20,  96 => 19,  93 => 18,  90 => 17,  83 => 16,  78 => 9,  76 => 8,  73 => 7,  66 => 6,  63 => 5,  61 => 4,  54 => 3,  43 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "@KnpMenu/menu.html copy.twig", "/var/www/html/templates/bundles/KnpMenuBundle/menu.html copy.twig");
    }
}
