<?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.twig */
class __TwigTemplate_e4b4f0cbed9c8e61376334e9b4654d47 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,         // line 53
($context["item"] ?? null), "name", [], "any", false, false, false, 53) != "Activités par commune") || (((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) || CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 53), "direction", [], "any", false, false, false, 53)) && (CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 53) == "Activités par commune")) && (CoreExtension::getAttribute($this->env, $this->source,         // line 55
($context["item"] ?? null), "name", [], "any", false, false, false, 55) != "Activités par arrondissement"))) || ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) || CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 55), "commune", [], "any", false, false, false, 55)) && (CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 55) == "Activités par arrondissement")))) {
            // line 57
            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, 57), "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, 57) != CoreExtension::getAttribute($this->env, $this->source, ($context["matcher"] ?? null), "isAncestor", [($context["item"] ?? null), 1], "method", false, false, false, 57))) {
                yield " active ";
            }
            yield "\">
        ";
            // line 58
            if ((($tmp =  !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "attribute", ["icon"], "method", false, false, false, 58))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 59
                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, 59), "html", null, true);
                yield "\"></i>
        ";
            } else {
                // line 61
                yield "            <i class=\"nav-icon far fa-circle\"></i>
        ";
            }
            // line 63
            yield "        <p>
            ";
            // line 64
            if ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 64) == "Sensibilité par ministère")) {
                // line 65
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 66
                    yield "                    Sensibilité par entité
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 67
($context["app"] ?? null), "user", [], "any", false, false, false, 67), "direction", [], "any", false, false, false, 67)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 68
                    yield "                    Sensibilité du ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 69
($context["app"] ?? null), "user", [], "any", false, false, false, 69), "commune", [], "any", false, false, false, 69)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 70
                    yield "                    Sensibilité de la commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 72
                    yield "                    Sensibilité par commune
                ";
                }
                // line 74
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 74) == "Ministère / ODD")) {
                // line 75
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 76
                    yield "                    Structure / ODD
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 77
($context["app"] ?? null), "user", [], "any", false, false, false, 77), "direction", [], "any", false, false, false, 77)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 78
                    yield "                    Ministère / ODD
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 79
($context["app"] ?? null), "user", [], "any", false, false, false, 79), "commune", [], "any", false, false, false, 79)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 80
                    yield "                    Commune / ODD
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 82
                    yield "                    Commune / ODD
                ";
                }
                // line 84
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 84) == "Ministère / Cible")) {
                // line 85
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 86
                    yield "                    Structure / Cible
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 87
($context["app"] ?? null), "user", [], "any", false, false, false, 87), "direction", [], "any", false, false, false, 87)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 88
                    yield "                    Ministère / Cible
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 89
($context["app"] ?? null), "user", [], "any", false, false, false, 89), "commune", [], "any", false, false, false, 89)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 90
                    yield "                    Commune / Cible
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 92
                    yield "                    Commune / Cible
                ";
                }
                // line 94
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 94) == "ODD / Ministère")) {
                // line 95
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 96
                    yield "                    ODD / Structure
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 97
($context["app"] ?? null), "user", [], "any", false, false, false, 97), "direction", [], "any", false, false, false, 97)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 98
                    yield "                    ODD / Ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 99
($context["app"] ?? null), "user", [], "any", false, false, false, 99), "commune", [], "any", false, false, false, 99)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 100
                    yield "                    ODD / Commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 102
                    yield "                    ODD / Commune
                ";
                }
                // line 104
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 104) == "Activité / Ministère")) {
                // line 105
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 106
                    yield "                    Activités / Structure
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 107
($context["app"] ?? null), "user", [], "any", false, false, false, 107), "direction", [], "any", false, false, false, 107)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 108
                    yield "                    Activités / Ministère
                ";
                } elseif ((($tmp = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,                 // line 109
($context["app"] ?? null), "user", [], "any", false, false, false, 109), "commune", [], "any", false, false, false, 109)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 110
                    yield "                    Activités / Commune
                ";
                } elseif ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 112
                    yield "                    Activités / Commune
                ";
                }
                // line 114
                yield "            ";
            } elseif ((CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "name", [], "any", false, false, false, 114) == "Validation du PTA")) {
                // line 115
                yield "                ";
                if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL") && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 115), "commune", [], "any", false, false, false, 115))) {
                    // line 116
                    yield "                    Soumission du PTA
                ";
                } else {
                    // line 118
                    yield "                    Validation du PTA
                ";
                }
                // line 120
                yield "            ";
            } else {
                // line 121
                yield "                ";
                yield from                 $this->unwrap()->yieldBlock("label", $context, $blocks);
                yield "
            ";
            }
            // line 123
            yield "
            ";
            // line 124
            if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "hasChildren", [], "any", false, false, false, 124)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 125
                yield "                <i class=\"right fas fa-angle-left\"></i>
            ";
            }
            // line 127
            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.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  376 => 35,  374 => 34,  369 => 33,  357 => 32,  349 => 127,  345 => 125,  343 => 124,  340 => 123,  334 => 121,  331 => 120,  327 => 118,  323 => 116,  320 => 115,  317 => 114,  313 => 112,  309 => 110,  307 => 109,  304 => 108,  302 => 107,  299 => 106,  296 => 105,  293 => 104,  289 => 102,  285 => 100,  283 => 99,  280 => 98,  278 => 97,  275 => 96,  272 => 95,  269 => 94,  265 => 92,  261 => 90,  259 => 89,  256 => 88,  254 => 87,  251 => 86,  248 => 85,  245 => 84,  241 => 82,  237 => 80,  235 => 79,  232 => 78,  230 => 77,  227 => 76,  224 => 75,  221 => 74,  217 => 72,  213 => 70,  211 => 69,  208 => 68,  206 => 67,  203 => 66,  200 => 65,  198 => 64,  195 => 63,  191 => 61,  185 => 59,  183 => 58,  174 => 57,  172 => 55,  171 => 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.twig", "/var/www/html/templates/bundles/KnpMenuBundle/menu.html.twig");
    }
}
