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

/* catalog/view/theme/journal3/template/journal3/module/marquee.twig */
class __TwigTemplate_d1ad93e51b6ab96721db213e4fde3a13 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
        $macros["_self"] = $this->macros["_self"] = $this;
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 29
        if (($context["items"] ?? null)) {
            // line 30
            echo "  <div class=\"";
            echo twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [0 => ($context["classes"] ?? null)], "method", false, false, false, 30);
            echo " ";
            echo ($context["color_scheme_module"] ?? null);
            echo "\">
    <button aria-label=\"Edit\" class=\"admin-edit\" type=\"button\" data-edit=\"";
            // line 31
            echo ($context["edit"] ?? null);
            echo "\"><em class=\"fa fa-pencil\" data-placement=\"auto\" data-toggle=\"tooltip-hover\" data-tooltip-class=\"admin-edit-tooltip\" title=\"Edit ";
            echo ($context["name"] ?? null);
            echo "\"></em></button>
    <div class=\"module-body\">
      <div class=\"marquee-slider\">
        <div class=\"marquee-items marquee-items-1\">
          ";
            // line 35
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(range(1, max(1, ($context["repeat"] ?? null))));
            foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                // line 36
                echo "            ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["items"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 37
                    echo "              ";
                    echo twig_call_macro($macros["_self"], "macro_renderMarquee", [$context, $context["item"]], 37, $context, $this->getSourceContext());
                    echo "
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 39
                echo "          ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 40
            echo "        </div>
        <div class=\"marquee-items marquee-items-2\" aria-hidden=\"true\">
          ";
            // line 42
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(range(1, max(1, ($context["repeat"] ?? null))));
            foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                // line 43
                echo "            ";
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(($context["items"] ?? null));
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 44
                    echo "              ";
                    echo twig_call_macro($macros["_self"], "macro_renderMarquee", [$context, $context["item"]], 44, $context, $this->getSourceContext());
                    echo "
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 46
                echo "          ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 47
            echo "        </div>
      </div>
    </div>
  </div>
";
        }
        // line 52
        echo "

";
    }

    // line 1
    public function macro_renderMarquee($__context__ = null, $__item__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "context" => $__context__,
            "item" => $__item__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 2
            echo "  ";
            $context["journal3"] = twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "journal3", [], "any", false, false, false, 2);
            // line 3
            echo "  ";
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "link", [], "any", false, false, false, 3), "href", [], "any", false, false, false, 3)) {
                // line 4
                echo "    <a href=\"";
                echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "link", [], "any", false, false, false, 4), "href", [], "any", false, false, false, 4);
                echo "\" class=\"";
                echo twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [0 => twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "classes", [], "any", false, false, false, 4)], "method", false, false, false, 4);
                echo "\" ";
                echo twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "linkAttrs", [0 => twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "link", [], "any", false, false, false, 4)], "method", false, false, false, 4);
                echo ">
      ";
                // line 5
                if ((twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "type", [], "any", false, false, false, 5) == "title")) {
                    // line 6
                    echo "        <span>";
                    echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "title", [], "any", false, false, false, 6);
                    echo "</span>
      ";
                } else {
                    // line 8
                    echo "        ";
                    if (twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "get", [0 => "performanceLazyLoadImagesStatus"], "method", false, false, false, 8)) {
                        // line 9
                        echo "          <img src=\"";
                        echo ($context["dummy_image"] ?? null);
                        echo "\" data-src=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 9);
                        echo "\" ";
                        if (($context["image2x"] ?? null)) {
                            echo "data-srcset=\"";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 9);
                            echo " 1x, ";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image2x", [], "any", false, false, false, 9);
                            echo " 2x\" ";
                        }
                        echo " alt=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "alt", [], "any", false, false, false, 9);
                        echo "\" width=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_width", [], "any", false, false, false, 9);
                        echo "\" height=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_height", [], "any", false, false, false, 9);
                        echo "\" class=\"lazyload\"/>
        ";
                    } else {
                        // line 11
                        echo "          <img src=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 11);
                        echo "\" ";
                        if (($context["image2x"] ?? null)) {
                            echo "srcset=\"";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 11);
                            echo " 1x, ";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image2x", [], "any", false, false, false, 11);
                            echo " 2x\" ";
                        }
                        echo " alt=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "alt", [], "any", false, false, false, 11);
                        echo "\" width=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_width", [], "any", false, false, false, 11);
                        echo "\" height=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_height", [], "any", false, false, false, 11);
                        echo "\"/>
        ";
                    }
                    // line 13
                    echo "      ";
                }
                // line 14
                echo "    </a>
  ";
            } else {
                // line 16
                echo "    <div class=\"";
                echo twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "classes", [0 => twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "classes", [], "any", false, false, false, 16)], "method", false, false, false, 16);
                echo "\">
      ";
                // line 17
                if ((twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "type", [], "any", false, false, false, 17) == "title")) {
                    // line 18
                    echo "        <span>";
                    echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "title", [], "any", false, false, false, 18);
                    echo "</span>
      ";
                } else {
                    // line 20
                    echo "        ";
                    if (twig_get_attribute($this->env, $this->source, ($context["journal3"] ?? null), "get", [0 => "performanceLazyLoadImagesStatus"], "method", false, false, false, 20)) {
                        // line 21
                        echo "          <img src=\"";
                        echo ($context["dummy_image"] ?? null);
                        echo "\" data-src=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 21);
                        echo "\" ";
                        if (($context["image2x"] ?? null)) {
                            echo "data-srcset=\"";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 21);
                            echo " 1x, ";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image2x", [], "any", false, false, false, 21);
                            echo " 2x\" ";
                        }
                        echo " alt=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "alt", [], "any", false, false, false, 21);
                        echo "\" width=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_width", [], "any", false, false, false, 21);
                        echo "\" height=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_height", [], "any", false, false, false, 21);
                        echo "\" class=\"lazyload\"/>
        ";
                    } else {
                        // line 23
                        echo "          <img src=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 23);
                        echo "\" ";
                        if (($context["image2x"] ?? null)) {
                            echo "srcset=\"";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image", [], "any", false, false, false, 23);
                            echo " 1x, ";
                            echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "image2x", [], "any", false, false, false, 23);
                            echo " 2x\" ";
                        }
                        echo " alt=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["item"] ?? null), "alt", [], "any", false, false, false, 23);
                        echo "\" width=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_width", [], "any", false, false, false, 23);
                        echo "\" height=\"";
                        echo twig_get_attribute($this->env, $this->source, ($context["context"] ?? null), "image_height", [], "any", false, false, false, 23);
                        echo "\"/>
        ";
                    }
                    // line 25
                    echo "      ";
                }
                // line 26
                echo "    </div>
  ";
            }

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

    public function getTemplateName()
    {
        return "catalog/view/theme/journal3/template/journal3/module/marquee.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  271 => 26,  268 => 25,  248 => 23,  226 => 21,  223 => 20,  217 => 18,  215 => 17,  210 => 16,  206 => 14,  203 => 13,  183 => 11,  161 => 9,  158 => 8,  152 => 6,  150 => 5,  141 => 4,  138 => 3,  135 => 2,  121 => 1,  115 => 52,  108 => 47,  102 => 46,  93 => 44,  88 => 43,  84 => 42,  80 => 40,  74 => 39,  65 => 37,  60 => 36,  56 => 35,  47 => 31,  40 => 30,  38 => 29,);
    }

    public function getSourceContext()
    {
        return new Source("", "catalog/view/theme/journal3/template/journal3/module/marquee.twig", "D:\\Documents\\Shahed\\Laragoon\\laragon\\www\\gtech\\catalog\\view\\theme\\journal3\\template\\journal3\\module\\marquee.twig");
    }
}
