<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* OfficeBrainCategoryBundle::homePageCategoryListing.html.twig */
class __TwigTemplate_bbc45ab766be687b6578a8f2a30d1d63e6a035f278af4c8cd5b06ff3191d9932 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->blocks = [
            'ajax_body' => [$this, 'block_ajax_body'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("::baseAjax.html.twig", "OfficeBrainCategoryBundle::homePageCategoryListing.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_ajax_body($context, array $blocks = [])
    {
        // line 4
        if (((isset($context["category_list"]) || array_key_exists("category_list", $context)) && (twig_length_filter($this->env, ($context["category_list"] ?? null)) > 0))) {
            // line 5
            echo "\t
\t\t<div class=\"row\">
\t\t\t";
            // line 7
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(($context["category_list"] ?? null));
            foreach ($context['_seq'] as $context["index"] => $context["category"]) {
                // line 8
                echo "\t\t\t\t\t";
                if (($this->getAttribute($context["category"], "status", []) == "Active")) {
                    // line 9
                    echo "\t\t\t\t\t<div class=\"col-md-6 col-12\">
\t\t\t\t\t\t<div class=\"category-box\">
\t\t\t\t\t\t\t<div class=\"category-img\">
\t\t\t\t\t\t\t\t";
                    // line 12
                    $context["imageSrc"] = "";
                    // line 13
                    echo "\t\t\t\t\t\t\t\t";
                    $context["altimage"] = "image-load-gif";
                    // line 14
                    echo "                                ";
                    if ((($this->getAttribute($context["category"], "image", []) != "") && $this->getAttribute($context["category"], "image", [], "any", true, true))) {
                        // line 15
                        echo "                                  ";
                        $context["imageSrc"] = ((($context["client_upload_base_url"] ?? null) . "category/") . $this->getAttribute($context["category"], "image", []));
                        // line 16
                        echo "                                  ";
                        $context["altimage"] = $this->getAttribute($context["category"], "cat_name", []);
                        // line 17
                        echo "                                ";
                    } else {
                        // line 18
                        echo "                                  ";
                        $context["imageSrc"] = $this->env->getExtension('Symfony\Bridge\Twig\Extension\AssetExtension')->getAssetUrl("bundles/officebraincustombundletheme/IdmeTheme/images/no-image-available.png");
                        // line 19
                        echo "                                ";
                    }
                    // line 20
                    echo "\t\t\t\t\t\t\t\t<img  class=\"lazy\" data-src=\"";
                    echo twig_escape_filter($this->env, ($context["imageSrc"] ?? null), "html", null, true);
                    echo "\" src=\"";
                    echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\AssetExtension')->getAssetUrl("images/uploads/media/20240326112149_image-load.gif", null, true), "html", null, true);
                    echo "\" alt=\"";
                    echo twig_escape_filter($this->env, ($context["altimage"] ?? null), "html", null, true);
                    echo "\" />
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<div class=\"category-texts\">
\t\t\t\t\t\t\t\t<div class=\"category-title\">";
                    // line 24
                    echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "cat_name", []), "html", null, true);
                    echo "</div>
\t\t\t\t\t\t\t\t<div class=\"category-text\">";
                    // line 25
                    echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "description", []), "html", null, true);
                    echo "</div>

\t\t\t\t\t\t\t\t";
                    // line 27
                    if (($this->getAttribute($context["category"], "categoryLink", []) != null)) {
                        // line 28
                        echo "\t\t\t\t\t\t\t\t\t<a href=\"";
                        echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "categoryLink", []), "html", null, true);
                        echo "\">
\t\t\t\t\t\t\t\t\t\tShop ";
                        // line 29
                        echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "cat_name", []), "html", null, true);
                        echo "
\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t";
                    } else {
                        // line 32
                        echo "\t\t\t\t\t\t\t\t\t";
                        if (($this->getAttribute($context["category"], "has_child", [], "any", true, true) && $this->getAttribute($context["category"], "has_child", []))) {
                            // line 33
                            echo "\t\t\t\t\t\t\t\t\t<a href=\"";
                            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("office_brain_search_bundle_browse_sub_category", ["_locale" => $this->getAttribute($this->getAttribute(($context["app"] ?? null), "request", []), "locale", []), "category_slug" => $this->getAttribute($context["category"], "slug", [])]), "html", null, true);
                            echo "\">
\t\t\t\t\t\t\t\t\t\tShop ";
                            // line 34
                            echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "cat_name", []), "html", null, true);
                            echo "
\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t";
                        } else {
                            // line 37
                            echo "\t\t\t\t\t\t\t\t\t<a href=\"";
                            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath("office_brain_search_bundle_browse_category_search", ["_locale" => $this->getAttribute($this->getAttribute(($context["app"] ?? null), "request", []), "locale", []), "category_slug" => $this->getAttribute($context["category"], "slug", [])]), "html", null, true);
                            echo "\">
\t\t\t\t\t\t\t\t\t\tShop   ";
                            // line 38
                            echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "cat_name", []), "html", null, true);
                            echo "
\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t";
                        }
                        // line 41
                        echo "\t\t\t\t\t\t\t\t";
                    }
                    // line 42
                    echo "
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t";
                }
                // line 47
                echo "\t\t    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['index'], $context['category'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 48
            echo "\t\t\t";
            // line 49
            echo "\t\t</div>
\t\t
\t";
        }
    }

    public function getTemplateName()
    {
        return "OfficeBrainCategoryBundle::homePageCategoryListing.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  160 => 49,  158 => 48,  152 => 47,  145 => 42,  142 => 41,  136 => 38,  131 => 37,  125 => 34,  120 => 33,  117 => 32,  111 => 29,  106 => 28,  104 => 27,  99 => 25,  95 => 24,  83 => 20,  80 => 19,  77 => 18,  74 => 17,  71 => 16,  68 => 15,  65 => 14,  62 => 13,  60 => 12,  55 => 9,  52 => 8,  48 => 7,  44 => 5,  42 => 4,  39 => 3,  29 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("", "OfficeBrainCategoryBundle::homePageCategoryListing.html.twig", "/var/www/html/src/OfficeBrain/Bundle/CategoryBundle/Resources/views/homePageCategoryListing.html.twig");
    }
}
