<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* @CoreHome/_menu.twig */
class __TwigTemplate_8f59972c8d36ce531873ed27f0c6c8c3a77af5d2104a8bfcd6ee88c3c4b58696 extends Template
{
    private $source;
    private $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 = [])
    {
        $macros = $this->macros;
    }

    // line 1
    public function macro_menu($__menu__ = null, $__anchorlink__ = null, $__cssClass__ = null, $__currentModule__ = null, $__currentAction__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "menu" => $__menu__,
            "anchorlink" => $__anchorlink__,
            "cssClass" => $__cssClass__,
            "currentModule" => $__currentModule__,
            "currentAction" => $__currentAction__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start();
        try {
            // line 2
            echo "    <div id=\"secondNavBar\" class=\"";
            echo \Piwik\piwik_escape_filter($this->env, (isset($context["cssClass"]) || array_key_exists("cssClass", $context) ? $context["cssClass"] : (function () { throw new RuntimeError('Variable "cssClass" does not exist.', 2, $this->source); })()), "html", null, true);
            echo " z-depth-1\">
        <ul class=\"navbar hide-on-med-and-down\" aria-label=\"";
            // line 3
            echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), ["CoreHome_MainNavigation"]), "html_attr");
            echo "\" role=\"menu\">
            ";
            // line 4
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["menu"]) || array_key_exists("menu", $context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.', 4, $this->source); })()));
            foreach ($context['_seq'] as $context["level1"] => $context["level2"]) {
                // line 5
                echo "
                ";
                // line 6
                $context["hasSubmenuItem"] = false;
                // line 7
                echo "                ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["level2"]);
                foreach ($context['_seq'] as $context["name"] => $context["urlParameters"]) {
                    // line 8
                    echo "                    ";
                    if ((0 !== twig_compare(twig_slice($this->env, $context["name"], 0, 1), "_"))) {
                        // line 9
                        echo "                        ";
                        $context["hasSubmenuItem"] = true;
                        // line 10
                        echo "                    ";
                    }
                    // line 11
                    echo "                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['name'], $context['urlParameters'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 12
                echo "
                ";
                // line 13
                if ((isset($context["hasSubmenuItem"]) || array_key_exists("hasSubmenuItem", $context) ? $context["hasSubmenuItem"] : (function () { throw new RuntimeError('Variable "hasSubmenuItem" does not exist.', 13, $this->source); })())) {
                    // line 14
                    echo "                    <li class=\"menuTab\" role=\"menuitem\">

                        <a class=\"item\" tabindex=\"5\">
                            <span class=\"menu-icon ";
                    // line 17
                    echo \Piwik\piwik_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["level2"], "_icon", [], "any", true, true, false, 17)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["level2"], "_icon", [], "any", false, false, false, 17), "icon-arrow-right")) : ("icon-arrow-right")), "html", null, true);
                    echo "\"></span>";
                    echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [$context["level1"]]), "html", null, true);
                    echo "
                            <span class=\"hidden\">
                             ";
                    // line 19
                    echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), ["CoreHome_Menu"]), "html", null, true);
                    echo "
                           </span>
                        </a>
                        <ul role=\"menu\">
                            ";
                    // line 23
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable($context["level2"]);
                    foreach ($context['_seq'] as $context["name"] => $context["urlParameters"]) {
                        // line 24
                        echo "                                ";
                        if ((0 !== twig_compare(twig_slice($this->env, $context["name"], 0, 1), "_"))) {
                            // line 25
                            echo "                                    <li ";
                            if ((((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, true, false, 25), "module", [], "any", true, true, false, 25) && (0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, false, false, 25), "module", [], "any", false, false, false, 25), (isset($context["currentModule"]) || array_key_exists("currentModule", $context) ? $context["currentModule"] : (function () { throw new RuntimeError('Variable "currentModule" does not exist.', 25, $this->source); })())))) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, true, false, 25), "action", [], "any", true, true, false, 25)) && (0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, false, false, 25), "action", [], "any", false, false, false, 25), (isset($context["currentAction"]) || array_key_exists("currentAction", $context) ? $context["currentAction"] : (function () { throw new RuntimeError('Variable "currentAction" does not exist.', 25, $this->source); })()))))) {
                                echo "class=\"active\"";
                            }
                            // line 26
                            echo "                                        role=\"menuitem\"
                                    >
                                        <a class=\"item\" tabindex=\"5\" target=\"_self\"
                                           title=\"";
                            // line 29
                            echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [((twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_tooltip", [], "any", true, true, false, 29)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_tooltip", [], "any", false, false, false, 29), "")) : (""))]), "html_attr");
                            echo "\"
                                            ";
                            // line 30
                            if ((twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_onclick", [], "any", true, true, false, 30) && twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_onclick", [], "any", false, false, false, 30))) {
                                // line 31
                                echo "                                                onclick=\"";
                                echo \Piwik\piwik_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_onclick", [], "any", false, false, false, 31), "html_attr");
                                echo ";return false;\"
                                            ";
                            }
                            // line 33
                            echo "                                            ";
                            if (twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, false, false, 33)) {
                                // line 34
                                echo "                                                href=\"index.php?";
                                echo \Piwik\piwik_escape_filter($this->env, twig_slice($this->env, call_user_func_array($this->env->getFilter('urlRewriteWithParameters')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, false, false, 34)]), 1), "html", null, true);
                                echo "\"
                                            ";
                            }
                            // line 35
                            echo ">
                                            ";
                            // line 36
                            if ((twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_icon", [], "any", true, true, false, 36) && twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_icon", [], "any", false, false, false, 36))) {
                                echo "<span class=\"icon ";
                                echo \Piwik\piwik_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_icon", [], "any", false, false, false, 36), "html_attr");
                                echo "\" style=\"margin-right: 5px;\"></span>";
                            }
                            // line 37
                            echo "                                            ";
                            echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [$context["name"]]), "html", null, true);
                            echo "
                                        </a>
                                    </li>
                                ";
                        }
                        // line 41
                        echo "                            ";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['name'], $context['urlParameters'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 42
                    echo "                        </ul>
                    </li>
                ";
                }
                // line 45
                echo "            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['level1'], $context['level2'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 46
            echo "        </ul>
        <ul id=\"mobile-left-menu\" class=\"sidenav hide-on-large-only\">
            ";
            // line 48
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["menu"]) || array_key_exists("menu", $context) ? $context["menu"] : (function () { throw new RuntimeError('Variable "menu" does not exist.', 48, $this->source); })()));
            foreach ($context['_seq'] as $context["level1"] => $context["level2"]) {
                // line 49
                echo "
            ";
                // line 50
                $context["hasSubmenuItem"] = false;
                // line 51
                echo "            ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["level2"]);
                foreach ($context['_seq'] as $context["name"] => $context["urlParameters"]) {
                    // line 52
                    echo "                ";
                    if ((0 !== twig_compare(twig_slice($this->env, $context["name"], 0, 1), "_"))) {
                        // line 53
                        echo "                    ";
                        $context["hasSubmenuItem"] = true;
                        // line 54
                        echo "                ";
                    }
                    // line 55
                    echo "            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['name'], $context['urlParameters'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 56
                echo "
            ";
                // line 57
                if ((isset($context["hasSubmenuItem"]) || array_key_exists("hasSubmenuItem", $context) ? $context["hasSubmenuItem"] : (function () { throw new RuntimeError('Variable "hasSubmenuItem" does not exist.', 57, $this->source); })())) {
                    // line 58
                    echo "            <li class=\"no-padding\">
                <ul class=\"collapsible collapsible-accordion\" piwik-side-nav=\"nav .activateLeftMenu\">
                    <li>
                        <a class=\"collapsible-header\">";
                    // line 61
                    echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [$context["level1"]]), "html", null, true);
                    echo "<i class=\"";
                    echo \Piwik\piwik_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, $context["level2"], "_icon", [], "any", true, true, false, 61)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["level2"], "_icon", [], "any", false, false, false, 61), "icon-arrow-down")) : ("icon-arrow-down")), "html", null, true);
                    echo "\"></i></a>
                        <div class=\"collapsible-body\">
                            <ul>
                                ";
                    // line 64
                    $context['_parent'] = $context;
                    $context['_seq'] = twig_ensure_traversable($context["level2"]);
                    foreach ($context['_seq'] as $context["name"] => $context["urlParameters"]) {
                        // line 65
                        echo "                                    ";
                        if ((0 !== twig_compare(twig_slice($this->env, $context["name"], 0, 1), "_"))) {
                            // line 66
                            echo "                                        <li>
                                            <a title=\"";
                            // line 67
                            echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [((twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_tooltip", [], "any", true, true, false, 67)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_tooltip", [], "any", false, false, false, 67), "")) : (""))]), "html_attr");
                            echo "\" target=\"_self\"
                                               href=\"index.php?";
                            // line 68
                            echo \Piwik\piwik_escape_filter($this->env, twig_slice($this->env, call_user_func_array($this->env->getFilter('urlRewriteWithParameters')->getCallable(), [twig_get_attribute($this->env, $this->source, $context["urlParameters"], "_url", [], "any", false, false, false, 68)]), 1), "html", null, true);
                            echo "\">";
                            echo \Piwik\piwik_escape_filter($this->env, call_user_func_array($this->env->getFilter('translate')->getCallable(), [$context["name"]]), "html", null, true);
                            echo "</a>
                                        </li>
                                    ";
                        }
                        // line 71
                        echo "                                ";
                    }
                    $_parent = $context['_parent'];
                    unset($context['_seq'], $context['_iterated'], $context['name'], $context['urlParameters'], $context['_parent'], $context['loop']);
                    $context = array_intersect_key($context, $_parent) + $_parent;
                    // line 72
                    echo "                            </ul>
                        </div>
                    </li>
                </ul>
                ";
                }
                // line 77
                echo "                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['level1'], $context['level2'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 78
            echo "            </li>
        </ul>
    </div>
";

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    public function getTemplateName()
    {
        return "@CoreHome/_menu.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  282 => 78,  276 => 77,  269 => 72,  263 => 71,  255 => 68,  251 => 67,  248 => 66,  245 => 65,  241 => 64,  233 => 61,  228 => 58,  226 => 57,  223 => 56,  217 => 55,  214 => 54,  211 => 53,  208 => 52,  203 => 51,  201 => 50,  198 => 49,  194 => 48,  190 => 46,  184 => 45,  179 => 42,  173 => 41,  165 => 37,  159 => 36,  156 => 35,  150 => 34,  147 => 33,  141 => 31,  139 => 30,  135 => 29,  130 => 26,  125 => 25,  122 => 24,  118 => 23,  111 => 19,  104 => 17,  99 => 14,  97 => 13,  94 => 12,  88 => 11,  85 => 10,  82 => 9,  79 => 8,  74 => 7,  72 => 6,  69 => 5,  65 => 4,  61 => 3,  56 => 2,  39 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% macro menu(menu, anchorlink, cssClass, currentModule, currentAction) %}
    <div id=\"secondNavBar\" class=\"{{ cssClass }} z-depth-1\">
        <ul class=\"navbar hide-on-med-and-down\" aria-label=\"{{ 'CoreHome_MainNavigation'|translate|e('html_attr') }}\" role=\"menu\">
            {% for level1,level2 in menu %}

                {% set hasSubmenuItem = false %}
                {% for name,urlParameters in level2 %}
                    {% if name|slice(0,1) != '_' %}
                        {% set hasSubmenuItem = true %}
                    {% endif %}
                {% endfor %}

                {% if hasSubmenuItem %}
                    <li class=\"menuTab\" role=\"menuitem\">

                        <a class=\"item\" tabindex=\"5\">
                            <span class=\"menu-icon {{ level2._icon|default('icon-arrow-right') }}\"></span>{{ level1|translate }}
                            <span class=\"hidden\">
                             {{ 'CoreHome_Menu'|translate }}
                           </span>
                        </a>
                        <ul role=\"menu\">
                            {% for name,urlParameters in level2 %}
                                {% if name|slice(0,1) != '_' %}
                                    <li {% if urlParameters._url.module is defined and urlParameters._url.module == currentModule and urlParameters._url.action is defined and urlParameters._url.action == currentAction %}class=\"active\"{% endif %}
                                        role=\"menuitem\"
                                    >
                                        <a class=\"item\" tabindex=\"5\" target=\"_self\"
                                           title=\"{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}\"
                                            {% if urlParameters._onclick is defined and urlParameters._onclick %}
                                                onclick=\"{{ urlParameters._onclick|e('html_attr') }};return false;\"
                                            {% endif %}
                                            {% if urlParameters._url %}
                                                href=\"index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}\"
                                            {% endif %}>
                                            {% if urlParameters._icon is defined and urlParameters._icon %}<span class=\"icon {{ urlParameters._icon|e('html_attr') }}\" style=\"margin-right: 5px;\"></span>{% endif %}
                                            {{ name|translate }}
                                        </a>
                                    </li>
                                {% endif %}
                            {% endfor %}
                        </ul>
                    </li>
                {% endif %}
            {% endfor %}
        </ul>
        <ul id=\"mobile-left-menu\" class=\"sidenav hide-on-large-only\">
            {% for level1,level2 in menu %}

            {% set hasSubmenuItem = false %}
            {% for name,urlParameters in level2 %}
                {% if name|slice(0,1) != '_' %}
                    {% set hasSubmenuItem = true %}
                {% endif %}
            {% endfor %}

            {% if hasSubmenuItem %}
            <li class=\"no-padding\">
                <ul class=\"collapsible collapsible-accordion\" piwik-side-nav=\"nav .activateLeftMenu\">
                    <li>
                        <a class=\"collapsible-header\">{{ level1|translate }}<i class=\"{{ level2._icon|default('icon-arrow-down') }}\"></i></a>
                        <div class=\"collapsible-body\">
                            <ul>
                                {% for name,urlParameters in level2 %}
                                    {% if name|slice(0,1) != '_' %}
                                        <li>
                                            <a title=\"{{ urlParameters._tooltip|default('')|translate|e('html_attr') }}\" target=\"_self\"
                                               href=\"index.php?{{ urlParameters._url|urlRewriteWithParameters|slice(1) }}\">{{ name|translate }}</a>
                                        </li>
                                    {% endif %}
                                {% endfor %}
                            </ul>
                        </div>
                    </li>
                </ul>
                {% endif %}
                {% endfor %}
            </li>
        </ul>
    </div>
{% endmacro %}
", "@CoreHome/_menu.twig", "/pages/1b/28/d0012466/home/htdocs/Piwik/plugins/CoreHome/templates/_menu.twig");
    }
}
