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

/* ice_cream/all.html.twig */
class __TwigTemplate_56fd34abf9c3e75e22c63944284c3325 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ice_cream/all.html.twig"));

        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ice_cream/all.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "ice_cream/all.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);

        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 3
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));

        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));

        // line 4
        echo "\t<main class=\"main\">
\t\t<div class=\"categories\">
\t\t\t<h2 style=\"text-align: center;\">Kategorijas</h2>
\t\t\t<a href=\"/\">
\t\t\t\t<div ";
        // line 8
        if (((isset($context["selected_category"]) || array_key_exists("selected_category", $context) ? $context["selected_category"] : (function () { throw new RuntimeError('Variable "selected_category" does not exist.', 8, $this->source); })()) == null)) {
            echo " class=\"selected\" ";
        }
        echo ">
\t\t\t\t\tВсе
\t\t\t\t</div>
\t\t\t</a>
\t\t\t";
        // line 12
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 12, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
            // line 13
            echo "\t\t\t\t<a href=\"?category=";
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 13), "html", null, true);
            echo "\">
\t\t\t\t\t<div ";
            // line 14
            if (((isset($context["selected_category"]) || array_key_exists("selected_category", $context) ? $context["selected_category"] : (function () { throw new RuntimeError('Variable "selected_category" does not exist.', 14, $this->source); })()) == twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, false, 14))) {
                echo " class=\"selected\" ";
            }
            echo ">
\t\t\t\t\t\t";
            // line 15
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, false, 15), "html", null, true);
            echo "
\t\t\t\t\t</div>
\t\t\t\t</a>
\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 19
        echo "\t\t</div>
\t\t<div class=\"table\">
\t\t\t";
        // line 21
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 21, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
            // line 22
            echo "\t\t\t\t<div class=\"product\">
\t\t\t\t\t";
            // line 23
            if (twig_get_attribute($this->env, $this->source, $context["product"], "img", [], "any", false, false, false, 23)) {
                // line 24
                echo "\t\t\t\t\t\t<img class=\"img\" src=\"";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "img", [], "any", false, false, false, 24), "html", null, true);
                echo "\" alt=\"";
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "img", [], "any", false, false, false, 24), "html", null, true);
                echo "\">
\t\t\t\t\t";
            }
            // line 26
            echo "
\t\t\t\t\t<h2>";
            // line 27
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "name", [], "any", false, false, false, 27), "html", null, true);
            echo "</h2>
\t\t\t\t\t<div style=\"width:100%;\">
\t\t\t\t\t\t<div class=\"vars\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<h3>€";
            // line 31
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "price", [], "any", false, false, false, 31), "html", null, true);
            echo "</h3>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<h3>";
            // line 34
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "weight", [], "any", false, false, false, 34), "html", null, true);
            echo "
\t\t\t\t\t\t\t\t\tg.</h3>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>


\t\t\t\t\t\t<div class=\"buy\">
\t\t\t\t\t\t\t<a href=\"/product/";
            // line 41
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["product"], "id", [], "any", false, false, false, 41), "html", null, true);
            echo "\">
\t\t\t\t\t\t\t\t<h1>Vairāk</h1>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>

\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 49
        echo "\t\t</div>

\t</main>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        
        $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);

    }

    public function getTemplateName()
    {
        return "ice_cream/all.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  169 => 49,  155 => 41,  145 => 34,  139 => 31,  132 => 27,  129 => 26,  121 => 24,  119 => 23,  116 => 22,  112 => 21,  108 => 19,  98 => 15,  92 => 14,  87 => 13,  83 => 12,  74 => 8,  68 => 4,  58 => 3,  35 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends \"base.html.twig\" %}

{% block content %}
\t<main class=\"main\">
\t\t<div class=\"categories\">
\t\t\t<h2 style=\"text-align: center;\">Kategorijas</h2>
\t\t\t<a href=\"/\">
\t\t\t\t<div {% if selected_category == null %} class=\"selected\" {% endif %}>
\t\t\t\t\tВсе
\t\t\t\t</div>
\t\t\t</a>
\t\t\t{% for category in categories %}
\t\t\t\t<a href=\"?category={{category.id}}\">
\t\t\t\t\t<div {% if selected_category == category.id %} class=\"selected\" {% endif %}>
\t\t\t\t\t\t{{category.name}}
\t\t\t\t\t</div>
\t\t\t\t</a>
\t\t\t{% endfor %}
\t\t</div>
\t\t<div class=\"table\">
\t\t\t{% for product in products %}
\t\t\t\t<div class=\"product\">
\t\t\t\t\t{% if product.img %}
\t\t\t\t\t\t<img class=\"img\" src=\"{{ product.img }}\" alt=\"{{ product.img }}\">
\t\t\t\t\t{% endif %}

\t\t\t\t\t<h2>{{product.name}}</h2>
\t\t\t\t\t<div style=\"width:100%;\">
\t\t\t\t\t\t<div class=\"vars\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<h3>€{{product.price}}</h3>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<h3>{{product.weight}}
\t\t\t\t\t\t\t\t\tg.</h3>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>


\t\t\t\t\t\t<div class=\"buy\">
\t\t\t\t\t\t\t<a href=\"/product/{{product.id}}\">
\t\t\t\t\t\t\t\t<h1>Vairāk</h1>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>

\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t{% endfor %}
\t\t</div>

\t</main>
{% endblock %}
", "ice_cream/all.html.twig", "C:\\xampp\\htdocs\\templates\\ice_cream\\all.html.twig");
    }
}
