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

/* extension/journal_3/catalog/view/template/product/review_list.twig */
class __TwigTemplate_1a236bf37e0f20f335e4fb2c8300f65f 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 1
        if (($context["reviews"] ?? null)) {
            // line 2
            yield "  ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["reviews"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["review"]) {
                // line 3
                yield "    <table class=\"table table-striped table-bordered\">
      <tr>
        <td style=\"width: 50%;\"><strong>";
                // line 5
                yield CoreExtension::getAttribute($this->env, $this->source, $context["review"], "author", [], "any", false, false, false, 5);
                yield "</strong></td>
        <td class=\"text-right text-end\">";
                // line 6
                yield CoreExtension::getAttribute($this->env, $this->source, $context["review"], "date_added", [], "any", false, false, false, 6);
                yield "</td>
      </tr>
      <tr>
        <td colspan=\"2\"><p>";
                // line 9
                yield CoreExtension::getAttribute($this->env, $this->source, $context["review"], "text", [], "any", false, false, false, 9);
                yield "</p>
          <div class=\"rating\">
            <div class=\"rating-stars\">
              ";
                // line 12
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(range(1, 5));
                foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                    // line 13
                    yield "                ";
                    if ((CoreExtension::getAttribute($this->env, $this->source, $context["review"], "rating", [], "any", false, false, false, 13) < $context["i"])) {
                        yield " <span class=\"fa fa-stack\"><em class=\"fa fa-star-o fa-stack-2x\"></em></span> ";
                    } else {
                        yield " <span class=\"fa fa-stack\"><em class=\"fa fa-star fa-stack-2x\"></em><em class=\"fa fa-star-o fa-stack-2x\"></em></span> ";
                    }
                    // line 14
                    yield "              ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 15
                yield "            </div>
          </div>
        </td>
      </tr>
    </table>
  ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['review'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 21
            yield "  <div class=\"text-left text-end\">";
            yield ($context["pagination"] ?? null);
            yield "</div>
";
        } else {
            // line 23
            yield "  <p class=\"text-center\">";
            yield ($context["text_no_results"] ?? null);
            yield "</p>
";
        }
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "extension/journal_3/catalog/view/template/product/review_list.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  103 => 23,  97 => 21,  86 => 15,  80 => 14,  73 => 13,  69 => 12,  63 => 9,  57 => 6,  53 => 5,  49 => 3,  44 => 2,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% if reviews %}
  {% for review in reviews %}
    <table class=\"table table-striped table-bordered\">
      <tr>
        <td style=\"width: 50%;\"><strong>{{ review.author }}</strong></td>
        <td class=\"text-right text-end\">{{ review.date_added }}</td>
      </tr>
      <tr>
        <td colspan=\"2\"><p>{{ review.text }}</p>
          <div class=\"rating\">
            <div class=\"rating-stars\">
              {% for i in 1..5 %}
                {% if review.rating < i %} <span class=\"fa fa-stack\"><em class=\"fa fa-star-o fa-stack-2x\"></em></span> {% else %} <span class=\"fa fa-stack\"><em class=\"fa fa-star fa-stack-2x\"></em><em class=\"fa fa-star-o fa-stack-2x\"></em></span> {% endif %}
              {% endfor %}
            </div>
          </div>
        </td>
      </tr>
    </table>
  {% endfor %}
  <div class=\"text-left text-end\">{{ pagination }}</div>
{% else %}
  <p class=\"text-center\">{{ text_no_results }}</p>
{% endif %}
", "extension/journal_3/catalog/view/template/product/review_list.twig", "/home/isatuzun/public_html/opencart.my-multiplanet.ch/extension/journal_3/catalog/view/template/product/review_list.twig");
    }
}
