<?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/banners.twig */
class __TwigTemplate_ce399bb281879668816b769a8454f35a 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 25
        yield "<div id=\"";
        yield ($context["id"] ?? null);
        yield "\" class=\"";
        yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [($context["classes"] ?? null)], "method", false, false, false, 25);
        yield "\">
  <button aria-label=\"Edit\" class=\"admin-edit\" type=\"button\" data-edit=\"";
        // line 26
        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 27
        if (($context["title"] ?? null)) {
            // line 28
            yield "    <h3 class=\"title module-title\">";
            yield ($context["title"] ?? null);
            yield "</h3>
  ";
        }
        // line 30
        yield "  <div class=\"module-body\">
    ";
        // line 32
        yield "    ";
        if (((($context["gridType"] ?? null) == "ipr") && ($context["carousel"] ?? null))) {
            // line 33
            yield "      <div class=\"swiper\" data-items-per-row='";
            yield json_encode(($context["itemsPerRow"] ?? null), Twig\Extension\CoreExtension::constant("JSON_FORCE_OBJECT"));
            yield "' data-options='";
            yield json_encode(($context["carouselOptions"] ?? null));
            yield "'>
        <div class=\"swiper-container\" ";
            // line 34
            if (CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "is_rtl", [], "any", false, false, false, 34)) {
                yield "dir=\"rtl\"";
            }
            yield ">
          <div class=\"swiper-wrapper ipr-grid\">
            ";
            // line 36
            yield $this->getTemplateForMacro("macro_renderBanners", $context, 36, $this->getSourceContext())->macro_renderBanners(...[$context]);
            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 46
            yield "      <div class=\"banners-grid no-scroll ";
            yield ($context["gridType"] ?? null);
            yield "-grid\">
        ";
            // line 47
            if ((($context["gridType"] ?? null) == "auto")) {
                // line 48
                yield "          <div class=\"auto-grid-items\">
            ";
                // line 49
                yield $this->getTemplateForMacro("macro_renderBanners", $context, 49, $this->getSourceContext())->macro_renderBanners(...[$context]);
                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 60
                yield "          ";
                yield $this->getTemplateForMacro("macro_renderBanners", $context, 60, $this->getSourceContext())->macro_renderBanners(...[$context]);
                yield "
        ";
            }
            // line 62
            yield "      </div>
    ";
        }
        // line 64
        yield "  </div>
</div>
";
        yield from [];
    }

    // line 1
    public function macro_renderBanners($͜context = null, ...$varargs): string|Markup
    {
        $macros = $this->macros;
        $context = [
            "context" => $͜context,
            "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 "  ";
            $context["index"] = 0;
            // line 4
            yield "  ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "items", [], "any", false, false, false, 4));
            foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                // line 5
                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, 5)], "method", false, false, false, 5);
                yield "\">
      <a ";
                // line 6
                if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "link", [], "any", false, false, false, 6), "href", [], "any", false, false, false, 6)) {
                    yield "href=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "link", [], "any", false, false, false, 6), "href", [], "any", false, false, false, 6);
                    yield "\"";
                }
                yield " ";
                yield CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "linkAttrs", [CoreExtension::getAttribute($this->env, $this->source, $context["item"], "link", [], "any", false, false, false, 6)], "method", false, false, false, 6);
                yield ">
        ";
                // line 7
                if ((CoreExtension::getAttribute($this->env, $this->source, ($context["journal3"] ?? null), "get", ["performanceLazyLoadImagesStatus"], "method", false, false, false, 7) && CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "lazyLoad", [], "any", false, false, false, 7))) {
                    // line 8
                    yield "          <img src=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, ($context["context"] ?? null), "dummy_image", [], "any", false, false, false, 8);
                    yield "\" data-src=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image", [], "any", false, false, false, 8);
                    yield "\" ";
                    if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image2x", [], "any", false, false, false, 8)) {
                        yield "data-srcset=\"";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image", [], "any", false, false, false, 8);
                        yield " 1x, ";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image2x", [], "any", false, false, false, 8);
                        yield " 2x\" ";
                    }
                    yield " alt=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "alt", [], "any", false, false, false, 8);
                    yield "\" width=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image_width", [], "any", false, false, false, 8);
                    yield "\" height=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image_height", [], "any", false, false, false, 8);
                    yield "\" class=\"lazyload\"/>
        ";
                } else {
                    // line 10
                    yield "          <img src=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image", [], "any", false, false, false, 10);
                    yield "\" ";
                    if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image2x", [], "any", false, false, false, 10)) {
                        yield "srcset=\"";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image", [], "any", false, false, false, 10);
                        yield " 1x, ";
                        yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image2x", [], "any", false, false, false, 10);
                        yield " 2x\" ";
                    }
                    yield " alt=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "alt", [], "any", false, false, false, 10);
                    yield "\" width=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image_width", [], "any", false, false, false, 10);
                    yield "\" height=\"";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "image_height", [], "any", false, false, false, 10);
                    yield "\"/>
        ";
                }
                // line 12
                yield "        ";
                if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 12)) {
                    // line 13
                    yield "          <div class=\"banner-text banner-caption\"><span>";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 13);
                    yield "</span></div>
        ";
                }
                // line 15
                yield "        ";
                if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title2", [], "any", false, false, false, 15)) {
                    // line 16
                    yield "          <div class=\"banner-text banner-caption-2\"><span>";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title2", [], "any", false, false, false, 16);
                    yield "</span></div>
        ";
                }
                // line 18
                yield "      </a>
      ";
                // line 19
                if (CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title3", [], "any", false, false, false, 19)) {
                    // line 20
                    yield "        <div class=\"banner-caption-3\"><span>";
                    yield CoreExtension::getAttribute($this->env, $this->source, $context["item"], "title3", [], "any", false, false, false, 20);
                    yield "</span></div>
      ";
                }
                // line 22
                yield "    </div>
  ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['item'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            yield from [];
        })())) ? '' : new Markup($tmp, $this->env->getCharset());
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  248 => 22,  242 => 20,  240 => 19,  237 => 18,  231 => 16,  228 => 15,  222 => 13,  219 => 12,  199 => 10,  177 => 8,  175 => 7,  165 => 6,  160 => 5,  155 => 4,  152 => 3,  149 => 2,  137 => 1,  130 => 64,  126 => 62,  120 => 60,  106 => 49,  103 => 48,  101 => 47,  96 => 46,  83 => 36,  76 => 34,  69 => 33,  66 => 32,  63 => 30,  57 => 28,  55 => 27,  49 => 26,  42 => 25,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% macro renderBanners(context) %}
  {% set journal3 = context.journal3 %}
  {% set index = 0 %}
  {% for item in context.items %}
    <div class=\"{{ journal3.classes(item.classes) }}\">
      <a {% if item.link.href %}href=\"{{ item.link.href }}\"{% endif %} {{ journal3.linkAttrs(item.link) }}>
        {% if journal3.get('performanceLazyLoadImagesStatus') and context.lazyLoad %}
          <img src=\"{{ context.dummy_image }}\" data-src=\"{{ item.image }}\" {% if item.image2x %}data-srcset=\"{{ item.image }} 1x, {{ item.image2x }} 2x\" {% endif %} alt=\"{{ item.alt }}\" width=\"{{ item.image_width }}\" height=\"{{ item.image_height }}\" class=\"lazyload\"/>
        {% else %}
          <img src=\"{{ item.image }}\" {% if item.image2x %}srcset=\"{{ item.image }} 1x, {{ item.image2x }} 2x\" {% endif %} alt=\"{{ item.alt }}\" width=\"{{ item.image_width }}\" height=\"{{ item.image_height }}\"/>
        {% endif %}
        {% if item.title %}
          <div class=\"banner-text banner-caption\"><span>{{ item.title }}</span></div>
        {% endif %}
        {% if item.title2 %}
          <div class=\"banner-text banner-caption-2\"><span>{{ item.title2 }}</span></div>
        {% endif %}
      </a>
      {% if item.title3 %}
        <div class=\"banner-caption-3\"><span>{{ item.title3 }}</span></div>
      {% endif %}
    </div>
  {% endfor %}
{% endmacro %}
<div id=\"{{ id }}\" 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 gridType == 'ipr' and carousel %}
      <div class=\"swiper\" data-items-per-row='{{ itemsPerRow|json_encode(constant('JSON_FORCE_OBJECT')) }}' data-options='{{ carouselOptions|json_encode }}'>
        <div class=\"swiper-container\" {% if journal3.is_rtl %}dir=\"rtl\"{% endif %}>
          <div class=\"swiper-wrapper ipr-grid\">
            {{ _self.renderBanners(_context) }}
          </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=\"banners-grid no-scroll {{ gridType }}-grid\">
        {% if gridType == 'auto' %}
          <div class=\"auto-grid-items\">
            {{ _self.renderBanners(_context) }}
          </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 %}
          {{ _self.renderBanners(_context) }}
        {% endif %}
      </div>
    {% endif %}
  </div>
</div>
", "catalog/view/theme/journal3/template/journal3/module/banners.twig", "/home/isatuzun/public_html/opencart.my-multiplanet.ch/catalog/view/theme/journal3/template/journal3/module/banners.twig");
    }
}
