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

/* themes/jeda/templates/menus/menu--main.html.twig */
class __TwigTemplate_78d507293b7aee2cedcc8f9ddfd7904b 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 = [
        ];
        $this->sandbox = $this->extensions[SandboxExtension::class];
        $this->checkSecurity();
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 21
        $macros["menus"] = $this->macros["menus"] = $this;
        // line 22
        yield "
";
        // line 27
        yield $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(CoreExtension::callMacro($macros["menus"], "macro_menu_links", [($context["items"] ?? null), ($context["attributes"] ?? null), 0, ($context["logo"] ?? null)], 27, $context, $this->getSourceContext()));
        yield "
";
        $this->env->getExtension('\Drupal\Core\Template\TwigExtension')
            ->checkDeprecations($context, ["_self", "items", "attributes", "logo", "menu_level"]);        yield from [];
    }

    // line 28
    public function macro_menu_links($__items__ = null, $__attributes__ = null, $__menu_level__ = null, $__logo__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = [
            "items" => $__items__,
            "attributes" => $__attributes__,
            "menu_level" => $__menu_level__,
            "logo" => $__logo__,
            "varargs" => $__varargs__,
        ] + $this->env->getGlobals();

        $blocks = [];

        return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
            // line 29
            yield "    ";
            $macros["menus"] = $this;
            // line 30
            yield "    ";
            if (($context["items"] ?? null)) {
                // line 31
                yield "        ";
                if ((($context["menu_level"] ?? null) == 0)) {
                    // line 32
                    yield "        ";
                }
                // line 33
                yield "        <ul class=\"menu menu--lvl-";
                yield $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["menu_level"] ?? null), 33, $this->source), "html", null, true);
                yield "\" >
            ";
                // line 34
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(($context["items"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 35
                    yield "                ";
                    $context["classes"] = [("menu__item menu--item-" . $this->sandbox->ensureToStringAllowed(                    // line 36
($context["menu_level"] ?? null), 36, $this->source)), ((CoreExtension::getAttribute($this->env, $this->source,                     // line 37
$context["item"], "is_expanded", [], "any", false, false, true, 37)) ? ("expanded exp") : ("")), ((CoreExtension::getAttribute($this->env, $this->source,                     // line 38
$context["item"], "is_collapsed", [], "any", false, false, true, 38)) ? ("collapsed") : ("")), ((CoreExtension::getAttribute($this->env, $this->source,                     // line 39
$context["item"], "in_active_trail", [], "any", false, false, true, 39)) ? ("active-trail") : ("")), (((CoreExtension::getAttribute($this->env, $this->source,                     // line 40
$context["item"], "title", [], "any", false, false, true, 40) === "Home")) ? ("menu--home") : (""))];
                    // line 42
                    yield "                <li";
                    yield $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "attributes", [], "any", false, false, true, 42), "addClass", [($context["classes"] ?? null)], "method", false, false, true, 42), 42, $this->source), "html", null, true);
                    yield ">
                    ";
                    // line 43
                    if ((CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, true, 43) === "Home")) {
                        // line 44
                        yield "                        <a class=\"menu__link branding logo\" href=\"";
                        yield $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar($this->extensions['Drupal\Core\Template\TwigExtension']->getPath("<front>"));
                        yield "\" rel=\"home\">
                            <img alt=\"Logo\" class=\"menu__img branding__img\" width=\"151\" height=\"79\" src=\"";
                        // line 45
                        yield $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed(($context["logo"] ?? null), 45, $this->source), "html", null, true);
                        yield "\" />
                        </a>
                    ";
                    } else {
                        // line 48
                        yield "                        ";
                        yield $this->extensions['Drupal\Core\Template\TwigExtension']->escapeFilter($this->env, $this->extensions['Drupal\Core\Template\TwigExtension']->getLink($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, true, 48), 48, $this->source), $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, true, 48), 48, $this->source), ["class" => ["menu__link", "text--upper"]]), "html", null, true);
                        yield "
                    ";
                    }
                    // line 50
                    yield "                    ";
                    if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "below", [], "any", false, false, true, 50)) {
                        // line 51
                        yield "                        ";
                        yield $this->extensions['Drupal\Core\Template\TwigExtension']->renderVar(CoreExtension::callMacro($macros["menus"], "macro_menu_links", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "below", [], "any", false, false, true, 51), ($context["attributes"] ?? null), (($context["menu_level"] ?? null) + 1)], 51, $context, $this->getSourceContext()));
                        yield "
                    ";
                    }
                    // line 53
                    yield "                </li>
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 55
                yield "        </ul>
    ";
            }
            yield from [];
        })())) ? '' : new Markup($tmp, $this->env->getCharset());
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "themes/jeda/templates/menus/menu--main.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  141 => 55,  134 => 53,  128 => 51,  125 => 50,  119 => 48,  113 => 45,  108 => 44,  106 => 43,  101 => 42,  99 => 40,  98 => 39,  97 => 38,  96 => 37,  95 => 36,  93 => 35,  89 => 34,  84 => 33,  81 => 32,  78 => 31,  75 => 30,  72 => 29,  57 => 28,  49 => 27,  46 => 22,  44 => 21,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "themes/jeda/templates/menus/menu--main.html.twig", "/home/szondatatask/public_html/jeda/web/themes/jeda/templates/menus/menu--main.html.twig");
    }
    
    public function checkSecurity()
    {
        static $tags = array("import" => 21, "macro" => 28, "if" => 30, "for" => 34, "set" => 35);
        static $filters = array("escape" => 33);
        static $functions = array("path" => 44, "link" => 48);

        try {
            $this->sandbox->checkSecurity(
                ['import', 'macro', 'if', 'for', 'set'],
                ['escape'],
                ['path', 'link'],
                $this->source
            );
        } catch (SecurityError $e) {
            $e->setSourceContext($this->source);

            if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
                $e->setTemplateLine($tags[$e->getTagName()]);
            } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
                $e->setTemplateLine($filters[$e->getFilterName()]);
            } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
                $e->setTemplateLine($functions[$e->getFunctionName()]);
            }

            throw $e;
        }

    }
}
