<?php

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

/* OfficeBrainCmsBundle:CmsMenu:menu.html.twig */
class __TwigTemplate_1e66b3ee65ef9b89266abddfd4c7a1340aaf6a331f3589a58d946bebdf9c058f extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->blocks = [
            'ajax_body' => [$this, 'block_ajax_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "::baseAjax.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("::baseAjax.html.twig", "OfficeBrainCmsBundle:CmsMenu:menu.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 2
    public function block_ajax_body($context, array $blocks = [])
    {
        // line 3
        echo "
";
        // line 4
        if (($this->getAttribute($this->getAttribute(($context["app"] ?? null), "request", []), "get", [0 => "allow_override"], "method") == 1)) {
            // line 5
            echo "\t";
            $this->loadTemplate((($context["ob_project_instance_theme_folder"] ?? null) . ":Cms/cmsMenuLayout.html.twig"), "OfficeBrainCmsBundle:CmsMenu:menu.html.twig", 5)->display($context);
        } else {
            // line 7
            echo "\t";
            // line 54
            echo "\t
\t";
            // line 55
            if (($context["menu"] ?? null)) {
                // line 56
                echo "\t    ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["menu"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 57
                    echo "\t    \t";
                    echo $this->getAttribute($this, "recursiveMenu", [0 => $context["item"], 1 => ($context["languageId"] ?? null), 2 => 1, 3 => ($context["ob_project_base_url"] ?? null), 4 => ($context["mediaLocation"] ?? null)], "method");
                    echo "
\t\t";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 59
                echo "\t";
            }
        }
        // line 61
        echo "
";
    }

    // line 7
    public function getrecursiveMenu($__item__ = null, $__languageId__ = null, $__level__ = null, $__ob_project_base_url__ = null, $__mediaLocation__ = null, ...$__varargs__)
    {
        $context = $this->env->mergeGlobals([
            "item" => $__item__,
            "languageId" => $__languageId__,
            "level" => $__level__,
            "ob_project_base_url" => $__ob_project_base_url__,
            "mediaLocation" => $__mediaLocation__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 8
            echo "\t\t";
            $context["liClass"] = "dropdown";
            // line 9
            echo "\t\t";
            $context["ulClass"] = "dropdown-menu";
            // line 10
            echo "\t\t";
            $context["hasMoreChild"] = 0;
            // line 11
            echo "\t\t";
            if (($this->getAttribute(($context["item"] ?? null), "children", [], "any", true, true) && twig_length_filter($this->env, $this->getAttribute(($context["item"] ?? null), "children", [])))) {
                // line 12
                echo "\t\t\t";
                $context["hasMoreChild"] = 1;
                // line 13
                echo "\t\t";
            }
            // line 14
            echo "\t
\t\t";
            // line 15
            if ((($context["level"] ?? null) == 2)) {
                // line 16
                echo "\t\t\t";
                $context["liClass"] = (($context["liClass"] ?? null) . "-submenu");
                // line 17
                echo "\t\t";
            }
            // line 18
            echo "\t 
\t\t<li ";
            // line 19
            if (($context["hasMoreChild"] ?? null)) {
                echo " class=\"";
                echo twig_escape_filter($this->env, ((($context["liClass"] ?? null) . " ") . $this->getAttribute(($context["item"] ?? null), "cssClasse", [])), "html", null, true);
                echo "\" ";
            } else {
                echo " class=\"";
                echo twig_escape_filter($this->env, $this->getAttribute(($context["item"] ?? null), "cssClasse", []), "html", null, true);
                echo "\" ";
            }
            echo ">
\t\t\t";
            // line 20
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["item"] ?? null), "languageMapping", []));
            foreach ($context['_seq'] as $context["_key"] => $context["itemLanguage"]) {
                // line 21
                echo "\t\t\t\t";
                if (($this->getAttribute($context["itemLanguage"], "languageId", []) == ($context["languageId"] ?? null))) {
                    // line 22
                    echo "\t\t\t\t\t<a href=\"";
                    echo twig_escape_filter($this->env, $this->getAttribute($context["itemLanguage"], "url", []), "html", null, true);
                    echo "\" ";
                    if ((($this->getAttribute(($context["item"] ?? null), "cssClasse", []) == "js-open-new-tab") || ($this->getAttribute($context["itemLanguage"], "urlTarget", []) == "new-tab"))) {
                        echo " target=\"_blank\" ";
                    }
                    echo " ";
                    if (($context["hasMoreChild"] ?? null)) {
                        echo " class=\"dropdown-toggle product-add ";
                        if (($this->getAttribute($context["itemLanguage"], "urlTarget", []) == "new-window")) {
                            echo "js-open-window";
                        }
                        echo "\" data-toggle=\"dropdown\" ";
                    } else {
                        echo " ";
                        if (($this->getAttribute($context["itemLanguage"], "urlTarget", []) == "new-window")) {
                            echo "class=\"js-open-window\"";
                        }
                        echo " ";
                    }
                    echo " title=\"";
                    echo twig_escape_filter($this->env, $this->getAttribute($context["itemLanguage"], "title", []), "html", null, true);
                    echo "\">";
                    if (($this->getAttribute(($context["item"] ?? null), "cssIcon", []) != "")) {
                        echo " <i class=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute(($context["item"] ?? null), "cssIcon", []), "html", null, true);
                        echo "\"></i> ";
                    }
                    if ((($this->getAttribute($this->getAttribute(($context["app"] ?? null), "user", [], "any", false, true), "id", [], "any", true, true) && ($this->getAttribute($this->getAttribute(($context["app"] ?? null), "user", []), "id", []) > 0)) && (($this->getAttribute($context["itemLanguage"], "itemLabel", []) == "Flyers") || ($this->getAttribute($context["itemLanguage"], "itemLabel", []) == "Order Catalog")))) {
                        echo twig_escape_filter($this->env, $this->getAttribute($context["itemLanguage"], "itemLabel", []), "html", null, true);
                    } elseif ((($this->getAttribute($context["itemLanguage"], "itemLabel", []) != "Flyers") && ($this->getAttribute($context["itemLanguage"], "itemLabel", []) != "Order Catalog"))) {
                        echo twig_escape_filter($this->env, $this->getAttribute($context["itemLanguage"], "itemLabel", []), "html", null, true);
                    }
                    echo "</a>
\t\t\t\t";
                }
                // line 24
                echo "\t\t\t";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['itemLanguage'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 25
            echo "\t
\t        ";
            // line 26
            if (($context["hasMoreChild"] ?? null)) {
                // line 27
                echo "\t        \t";
                $context["level"] = (($context["level"] ?? null) + 1);
                // line 28
                echo "\t        \t<b class=\"menu-caret1\" data-toggle=\"dropdown\"></b>
\t
\t        \t";
                // line 30
                if ((($context["level"] ?? null) == 3)) {
                    // line 31
                    echo "\t        \t\t<div class=\"dropdown-menu\">
\t\t\t\t\t\t<div class=\"col-lg-6 col-md-8 col-sm-12 col-xs-12\">
\t\t\t\t\t";
                    // line 33
                    $context["ulClass"] = "";
                    // line 34
                    echo "\t        \t";
                }
                // line 35
                echo "\t
\t        \t<ul class=\"";
                // line 36
                echo twig_escape_filter($this->env, ($context["ulClass"] ?? null), "html", null, true);
                echo "\">
\t                ";
                // line 37
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["item"] ?? null), "children", []));
                foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
                    // line 38
                    echo "\t                \t";
                    echo $this->getAttribute($this, "recursiveMenu", [0 => $context["child"], 1 => ($context["languageId"] ?? null), 2 => ($context["level"] ?? null), 3 => ($context["ob_project_base_url"] ?? null), 4 => ($context["mediaLocation"] ?? null)], "method");
                    echo "
\t                ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 40
                echo "\t            </ul>
\t
\t            ";
                // line 42
                if ((($context["level"] ?? null) == 3)) {
                    // line 43
                    echo "\t        \t\t\t</div>
\t        \t\t\t<div class=\"col-lg-2 hidden-xs hidden-md hidden-sm\">
\t        \t\t\t\t";
                    // line 45
                    if (($this->getAttribute(($context["item"] ?? null), "backgroundImage", []) != "")) {
                        // line 46
                        echo "\t        \t\t\t\t\t<a href=\"javascript:void(0)\"><img src=\"";
                        echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\AssetExtension')->getAssetUrl((($context["mediaLocation"] ?? null) . $this->getAttribute(($context["item"] ?? null), "backgroundImage", []))), "html", null, true);
                        echo "\" class=\"menu-pro-img\" alt=\"\"></a>
\t\t                    ";
                    }
                    // line 48
                    echo "\t        \t\t\t</div>
\t\t\t\t\t</div>
\t        \t";
                }
                // line 51
                echo "\t        ";
            }
            // line 52
            echo "\t    </li>
\t";
        } catch (\Exception $e) {
            ob_end_clean();

            throw $e;
        } catch (\Throwable $e) {
            ob_end_clean();

            throw $e;
        }

        return ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
    }

    public function getTemplateName()
    {
        return "OfficeBrainCmsBundle:CmsMenu:menu.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  260 => 52,  257 => 51,  252 => 48,  246 => 46,  244 => 45,  240 => 43,  238 => 42,  234 => 40,  225 => 38,  221 => 37,  217 => 36,  214 => 35,  211 => 34,  209 => 33,  205 => 31,  203 => 30,  199 => 28,  196 => 27,  194 => 26,  191 => 25,  185 => 24,  148 => 22,  145 => 21,  141 => 20,  129 => 19,  126 => 18,  123 => 17,  120 => 16,  118 => 15,  115 => 14,  112 => 13,  109 => 12,  106 => 11,  103 => 10,  100 => 9,  97 => 8,  81 => 7,  76 => 61,  72 => 59,  63 => 57,  58 => 56,  56 => 55,  53 => 54,  51 => 7,  47 => 5,  45 => 4,  42 => 3,  39 => 2,  29 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("", "OfficeBrainCmsBundle:CmsMenu:menu.html.twig", "/var/www/html/src/OfficeBrain/Bundle/CmsBundle/Resources/views/CmsMenu/menu.html.twig");
    }
}
