<?php

/* @websiteWidgets/blog/templates/category_list.twig.html */
class __TwigTemplate_474fe9c2c5e714b7b8d61aa88e43ee864f38a73506662c6655f0e6e5ce61bc84 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<div data-widget-id=\"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "\" class=\"moto-widget moto-widget-blog-category_list ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getCssClasses", [], "method"), "html", null, true);
        echo " moto-widget_flex-alignment\" data-widget=\"blog.category_list\" data-preset=\"";
        echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "preset", []), "html", null, true);
        echo "\">
    ";
        // line 2
        if ((twig_length_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getCategories", [], "method")) > 0)) {
            // line 3
            echo "        <div class=\"moto-widget-blog-category_list__content-wrapper\">
            ";
            // line 4
            if ((twig_length_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "title", []), "content", [])) > 0)) {
                // line 5
                echo "                <div class=\"moto-widget-blog-category_list__title ";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "title", []), "textStyle", []), "html", null, true);
                echo " moto-spacing-bottom-";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "title", []), "bottomSpacing", []), "html", null, true);
                echo "\">";
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "title", []), "content", []), "html", null, true);
                echo "</div>
            ";
            }
            // line 7
            echo "            <ul class=\"moto-widget-blog-category_list__items\">
                ";
            // line 8
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getCategories", [], "method"));
            foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
                // line 9
                echo "                    <li class=\"moto-widget-blog-category_list__item\"><a ";
                if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
                    echo "href";
                } else {
                    echo "href=\"";
                    echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "getRelativeUrl", [], "method"), "html", null, true);
                    echo "\"";
                }
                echo " class=\"moto-widget-blog-category_list__item-link moto-widget__flex-alignment-element\">";
                if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "icon", []), "id", [])) {
                    echo "<span class=\"moto-widget-blog-category_list__item-icon fa fa-";
                    echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "icon", []), "id", []), "html", null, true);
                    echo "\" aria-hidden=\"true\"></span>";
                }
                echo "<span class=\"moto-widget-blog-category_list__item-text\">";
                echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "name", []), "html", null, true);
                echo "</span>";
                if ($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "postsCount", []), "visible", [])) {
                    echo "<span class=\"moto-widget-blog-category_list__item-count\">(";
                    echo twig_escape_filter($this->env, $this->getAttribute($context["category"], "published_targets_count", []), "html", null, true);
                    echo ")</span>";
                }
                echo "</a></li>
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 11
            echo "            </ul>
        </div>
    ";
        } else {
            // line 14
            echo "        <div class=\"moto-widget-empty\"></div>
    ";
        }
        // line 16
        echo "</div>";
    }

    public function getTemplateName()
    {
        return "@websiteWidgets/blog/templates/category_list.twig.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  90 => 16,  86 => 14,  81 => 11,  52 => 9,  48 => 8,  45 => 7,  35 => 5,  33 => 4,  30 => 3,  28 => 2,  19 => 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 Twig_Source("", "@websiteWidgets/blog/templates/category_list.twig.html", "/data05/c3111787/public_html/brcc.me.uk/mt-includes/widgets/blog/templates/category_list.twig.html");
    }
}
