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

/* catalog/view/theme/journal3/template/journal3/module/categories.twig */
class __TwigTemplate_7e4312878f84fa9a85e90f662419a52d 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 = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 30
        yield "<div class=\"";
        yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [($context["classes"] ?? null)], "method", false, false, false, 30);
        yield "\">
  <button aria-label=\"Edit\" class=\"admin-edit\" type=\"button\" data-edit=\"";
        // line 31
        yield ($context["edit"] ?? null);
        yield "\"><em class=\"fa fa-pencil\" data-placement=\"auto\" data-toggle=\"tooltip-hover\" data-tooltip-class=\"admin-edit-tooltip\" title=\"Edit ";
        yield ($context["name"] ?? null);
        yield "\"></em></button>
  ";
        // line 32
        if (($context["title"] ?? null)) {
            // line 33
            yield "    <h3 class=\"title module-title\">";
            yield ($context["title"] ?? null);
            yield "</h3>
  ";
        }
        // line 35
        yield "  <div class=\"module-body\">
    ";
        // line 37
        yield "    ";
        if ((($context["sectionsDisplay"] ?? null) == "blocks")) {
            // line 38
            yield "      ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["items"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                // line 39
                yield "        <div class=\"";
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "classes", [], "any", false, false, false, 39)], "method", false, false, false, 39);
                yield "\">
          ";
                // line 40
                if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 40)) {
                    // line 41
                    yield "            <h3 class=\"title module-title\">";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 41);
                    yield "</h3>
          ";
                }
                // line 43
                yield "          ";
                yield $this->getTemplateForMacro("macro_renderCategories", $context, 43, $this->getSourceContext())->macro_renderCategories(...[$context, $context["item"]]);
                yield "
        </div>
      ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 46
            yield "    ";
        }
        // line 47
        yield "    ";
        // line 48
        yield "    ";
        if ((($context["sectionsDisplay"] ?? null) == "tabs")) {
            // line 49
            yield "      <div class=\"tab-container\">
        <div class=\"full-tabs-bg\"></div>
        <ul class=\"nav nav-tabs\">
          ";
            // line 52
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["items"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                // line 53
                yield "            <li class=\"";
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "tab_classes", [], "any", false, false, false, 53)], "method", false, false, false, 53);
                yield "\">
              ";
                // line 54
                if ((CoreExtension::getAttribute($this->env, $this->source, $context["item"], "tabType", [], "any", false, false, false, 54) == "link")) {
                    // line 55
                    yield "                <a href=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "link", [], "any", false, false, false, 55), "href", [], "any", false, false, false, 55);
                    yield "\">";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 55);
                    yield "</a>
              ";
                } else {
                    // line 57
                    yield "                <a href=\"#";
                    yield ($context["id"] ?? null);
                    yield "-tab-";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "index", [], "any", false, false, false, 57);
                    yield "\" data-toggle=\"tab\">";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 57);
                    yield "</a>
              ";
                }
                // line 59
                yield "            </li>
          ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 61
            yield "        </ul>
        <div class=\"tab-content\">
          ";
            // line 63
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["items"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                // line 64
                yield "            ";
                if ((CoreExtension::getAttribute($this->env, $this->source, $context["item"], "tabType", [], "any", false, false, false, 64) != "link")) {
                    // line 65
                    yield "              ";
                    if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "active", [], "any", false, false, false, 65)) {
                        // line 66
                        yield "                <div class=\"";
                        yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "classes", [], "any", false, false, false, 66)], "method", false, false, false, 66);
                        yield "\" id=\"";
                        yield ($context["id"] ?? null);
                        yield "-tab-";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "index", [], "any", false, false, false, 66);
                        yield "\">
                  ";
                        // line 67
                        yield $this->getTemplateForMacro("macro_renderCategories", $context, 67, $this->getSourceContext())->macro_renderCategories(...[$context, $context["item"]]);
                        yield "
                </div>
              ";
                    } else {
                        // line 70
                        yield "                <template class=\"";
                        yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "classes", [], "any", false, false, false, 70)], "method", false, false, false, 70);
                        yield "\" id=\"";
                        yield ($context["id"] ?? null);
                        yield "-tab-";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "index", [], "any", false, false, false, 70);
                        yield "\">
                  ";
                        // line 71
                        yield $this->getTemplateForMacro("macro_renderCategories", $context, 71, $this->getSourceContext())->macro_renderCategories(...[$context, $context["item"]]);
                        yield "
                </template>
              ";
                    }
                    // line 74
                    yield "            ";
                }
                // line 75
                yield "          ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 76
            yield "        </div>
      </div>
    ";
        }
        // line 79
        yield "    ";
        // line 80
        yield "    ";
        if ((($context["sectionsDisplay"] ?? null) == "accordion")) {
            // line 81
            yield "      <div class=\"panel-group\" id=\"";
            yield ($context["id"] ?? null);
            yield "-collapse\">
        ";
            // line 82
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["items"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                // line 83
                yield "          <div class=\"";
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "classes", [], "any", false, false, false, 83)], "method", false, false, false, 83);
                yield "\">
            <div class=\"panel-heading\">
              <h4 class=\"panel-title\">
                <a href=\"#";
                // line 86
                yield ($context["id"] ?? null);
                yield "-collapse-";
                yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "index", [], "any", false, false, false, 86);
                yield "\" class=\"accordion-toggle collapsed\" data-toggle=\"collapse\" data-parent=\"#";
                yield ($context["id"] ?? null);
                yield "-collapse\" aria-expanded=\"false\">
                  ";
                // line 87
                yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 87);
                yield "
                  <i class=\"fa fa-caret-down\"></i>
                </a>
              </h4>
            </div>
            <div class=\"";
                // line 92
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "panel_classes", [], "any", false, false, false, 92)], "method", false, false, false, 92);
                yield "\" id=\"";
                yield ($context["id"] ?? null);
                yield "-collapse-";
                yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "index", [], "any", false, false, false, 92);
                yield "\">
              ";
                // line 93
                if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "active", [], "any", false, false, false, 93)) {
                    // line 94
                    yield "                <div class=\"panel-body\">
                  ";
                    // line 95
                    yield $this->getTemplateForMacro("macro_renderCategories", $context, 95, $this->getSourceContext())->macro_renderCategories(...[$context, $context["item"]]);
                    yield "
                </div>
              ";
                } else {
                    // line 98
                    yield "                <template class=\"panel-body\">
                  ";
                    // line 99
                    yield $this->getTemplateForMacro("macro_renderCategories", $context, 99, $this->getSourceContext())->macro_renderCategories(...[$context, $context["item"]]);
                    yield "
                </template>
              ";
                }
                // line 102
                yield "            </div>
          </div>
        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 105
            yield "      </div>
    ";
        }
        // line 107
        yield "  </div>
</div>
";
        yield from [];
    }

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

        $blocks = [];

        return ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
            // line 2
            yield "  ";
            $context["journal3"] = CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "journal3", [], "any", false, false, false, 2);
            // line 3
            yield "  ";
            if (((CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "gridType", [], "any", false, false, false, 3) == "ipr") && CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "swiper_carousel", [], "any", false, false, false, 3))) {
                // line 4
                yield "    <div class=\"swiper\" data-items-per-row='";
                yield json_encode(CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "itemsPerRow", [], "any", false, false, false, 4), Twig\Extension\CoreExtension::constant("JSON_FORCE_OBJECT"));
                yield "' data-options='";
                yield json_encode(CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "carouselOptions", [], "any", false, false, false, 4), Twig\Extension\CoreExtension::constant("JSON_FORCE_OBJECT"));
                yield "'>
      <div class=\"swiper-container\" ";
                // line 5
                if (CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "is_rtl", [], "any", false, false, false, 5)) {
                    yield "dir=\"rtl\"";
                }
                yield ">
        <div class=\"swiper-wrapper category-grid ipr-grid\">
          ";
                // line 7
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "categories", [], "any", false, false, false, 7);
                yield "
        </div>
      </div>
      <div class=\"swiper-buttons\">
        <div class=\"swiper-button-prev\"></div>
        <div class=\"swiper-button-next\"></div>
      </div>
      <div class=\"swiper-pagination\"></div>
    </div>
  ";
            } else {
                // line 17
                yield "    <div class=\"category-grid no-scroll ";
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "gridType", [], "any", false, false, false, 17);
                yield "-grid\">
      ";
                // line 18
                if ((CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "gridType", [], "any", false, false, false, 18) == "auto")) {
                    // line 19
                    yield "        <div class=\"auto-grid-items\">
          ";
                    // line 20
                    yield CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "categories", [], "any", false, false, false, 20);
                    yield "
        </div>
        <div class=\"auto-carousel-bar auto-carousel-controls\"><div class=\"auto-carousel-thumb\"></div><div class=\"auto-carousel-fill\"></div></div>
        <div class=\"auto-carousel-buttons auto-carousel-controls\"><div class=\"auto-carousel-prev\"><span></span></div><div class=\"auto-carousel-next\"><span></span></div></div>
      ";
                } else {
                    // line 25
                    yield "        ";
                    yield CoreExtension::getAttribute($this->env, $this->source, ($context["item"] ?? null), "categories", [], "any", false, false, false, 25);
                    yield "
      ";
                }
                // line 27
                yield "    </div>
  ";
            }
            yield from [];
        })())) ? '' : new Markup($tmp, $this->env->getCharset());
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "catalog/view/theme/journal3/template/journal3/module/categories.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  356 => 27,  350 => 25,  342 => 20,  339 => 19,  337 => 18,  332 => 17,  319 => 7,  312 => 5,  305 => 4,  302 => 3,  299 => 2,  286 => 1,  279 => 107,  275 => 105,  267 => 102,  261 => 99,  258 => 98,  252 => 95,  249 => 94,  247 => 93,  239 => 92,  231 => 87,  223 => 86,  216 => 83,  212 => 82,  207 => 81,  204 => 80,  202 => 79,  197 => 76,  191 => 75,  188 => 74,  182 => 71,  173 => 70,  167 => 67,  158 => 66,  155 => 65,  152 => 64,  148 => 63,  144 => 61,  137 => 59,  127 => 57,  119 => 55,  117 => 54,  112 => 53,  108 => 52,  103 => 49,  100 => 48,  98 => 47,  95 => 46,  85 => 43,  79 => 41,  77 => 40,  72 => 39,  67 => 38,  64 => 37,  61 => 35,  55 => 33,  53 => 32,  47 => 31,  42 => 30,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% macro renderCategories(context, item) %}
  {% set journal3 = context.journal3 %}
  {% if context.gridType == 'ipr' and context.swiper_carousel %}
    <div class=\"swiper\" data-items-per-row='{{ context.itemsPerRow|json_encode(constant('JSON_FORCE_OBJECT')) }}' data-options='{{ context.carouselOptions|json_encode(constant('JSON_FORCE_OBJECT')) }}'>
      <div class=\"swiper-container\" {% if journal3.is_rtl %}dir=\"rtl\"{% endif %}>
        <div class=\"swiper-wrapper category-grid ipr-grid\">
          {{ item.categories }}
        </div>
      </div>
      <div class=\"swiper-buttons\">
        <div class=\"swiper-button-prev\"></div>
        <div class=\"swiper-button-next\"></div>
      </div>
      <div class=\"swiper-pagination\"></div>
    </div>
  {% else %}
    <div class=\"category-grid no-scroll {{ context.gridType }}-grid\">
      {% if context.gridType == 'auto' %}
        <div class=\"auto-grid-items\">
          {{ item.categories }}
        </div>
        <div class=\"auto-carousel-bar auto-carousel-controls\"><div class=\"auto-carousel-thumb\"></div><div class=\"auto-carousel-fill\"></div></div>
        <div class=\"auto-carousel-buttons auto-carousel-controls\"><div class=\"auto-carousel-prev\"><span></span></div><div class=\"auto-carousel-next\"><span></span></div></div>
      {% else %}
        {{ item.categories }}
      {% endif %}
    </div>
  {% endif %}
{% endmacro %}
<div class=\"{{ journal3.classes(classes) }}\">
  <button aria-label=\"Edit\" class=\"admin-edit\" type=\"button\" data-edit=\"{{ edit }}\"><em class=\"fa fa-pencil\" data-placement=\"auto\" data-toggle=\"tooltip-hover\" data-tooltip-class=\"admin-edit-tooltip\" title=\"Edit {{ name }}\"></em></button>
  {% if title %}
    <h3 class=\"title module-title\">{{ title }}</h3>
  {% endif %}
  <div class=\"module-body\">
    {# grid #}
    {% if sectionsDisplay == 'blocks' %}
      {% for item in items %}
        <div class=\"{{ journal3.classes(item.classes) }}\">
          {% if item.title %}
            <h3 class=\"title module-title\">{{ item.title }}</h3>
          {% endif %}
          {{ _self.renderCategories(_context, item) }}
        </div>
      {% endfor %}
    {% endif %}
    {# tabs #}
    {% if sectionsDisplay == 'tabs' %}
      <div class=\"tab-container\">
        <div class=\"full-tabs-bg\"></div>
        <ul class=\"nav nav-tabs\">
          {% for item in items %}
            <li class=\"{{ journal3.classes(item.tab_classes) }}\">
              {% if item.tabType == 'link' %}
                <a href=\"{{ item.link.href }}\">{{ item.title }}</a>
              {% else %}
                <a href=\"#{{ id }}-tab-{{ item.index }}\" data-toggle=\"tab\">{{ item.title }}</a>
              {% endif %}
            </li>
          {% endfor %}
        </ul>
        <div class=\"tab-content\">
          {% for item in items %}
            {% if item.tabType != 'link' %}
              {% if item.active %}
                <div class=\"{{ journal3.classes(item.classes) }}\" id=\"{{ id }}-tab-{{ item.index }}\">
                  {{ _self.renderCategories(_context, item) }}
                </div>
              {% else %}
                <template class=\"{{ journal3.classes(item.classes) }}\" id=\"{{ id }}-tab-{{ item.index }}\">
                  {{ _self.renderCategories(_context, item) }}
                </template>
              {% endif %}
            {% endif %}
          {% endfor %}
        </div>
      </div>
    {% endif %}
    {# accordion #}
    {% if sectionsDisplay == 'accordion' %}
      <div class=\"panel-group\" id=\"{{ id }}-collapse\">
        {% for item in items %}
          <div class=\"{{ journal3.classes(item.classes) }}\">
            <div class=\"panel-heading\">
              <h4 class=\"panel-title\">
                <a href=\"#{{ id }}-collapse-{{ item.index }}\" class=\"accordion-toggle collapsed\" data-toggle=\"collapse\" data-parent=\"#{{ id }}-collapse\" aria-expanded=\"false\">
                  {{ item.title }}
                  <i class=\"fa fa-caret-down\"></i>
                </a>
              </h4>
            </div>
            <div class=\"{{ journal3.classes(item.panel_classes) }}\" id=\"{{ id }}-collapse-{{ item.index }}\">
              {% if item.active %}
                <div class=\"panel-body\">
                  {{ _self.renderCategories(_context, item) }}
                </div>
              {% else %}
                <template class=\"panel-body\">
                  {{ _self.renderCategories(_context, item) }}
                </template>
              {% endif %}
            </div>
          </div>
        {% endfor %}
      </div>
    {% endif %}
  </div>
</div>
", "catalog/view/theme/journal3/template/journal3/module/categories.twig", "/home/isatuzun/public_html/opencart.my-multiplanet.ch/catalog/view/theme/journal3/template/journal3/module/categories.twig");
    }
}
