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

/* parts/case-studies.twig */
class __TwigTemplate_c5346607689fcbcf06b151819f0aca7c extends Template
{
    private $source;
    private $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 = [])
    {
        $macros = $this->macros;
        // line 1
        echo "<section class=\"c-case-studies u-mb-md\">
    <header class=\"c-section-hdr c-section-hdr--sb u-gutters\">
        <h2 class=\"u-h-bul\">";
        // line 3
        echo ($context["heading"] ?? null);
        echo "</h2>
        <a href=\"/case-studies\" class=\"c-btn u-visible-desktop\">View all Projects</a>
    </header>
    <div class=\"c-case-studies__grid u-gutters\">
        ";
        // line 7
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["list"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 8
            echo "            <div class=\"c-case-studies__grid-item\">
                <div class=\"c-case-study-card\">
                    <a href=\"";
            // line 10
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "url", [], "any", false, false, false, 10), "html", null, true);
            echo "\" title=\"View the ";
            echo twig_get_attribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 10);
            echo " case study\" class=\"c-case-study-card__poster\">
                        ";
            // line 11
            if (twig_get_attribute($this->env, $this->source, $context["item"], "card_image", [], "any", false, false, false, 11)) {
                echo twig_get_attribute($this->env, $this->source, ($context["fn"] ?? null), "wp_get_attachment_image", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "card_image", [], "any", false, false, false, 11), "id", [], "any", false, false, false, 11), "cs_card", false, ["class" => "u-object-image"]], "method", false, false, false, 11);
            }
            // line 12
            echo "                    </a>
                    <div class=\"c-case-study-card__content\">
                        <div class=\"c-case-study-card__info\">
                            <div class=\"c-case-study-card__info-col\"><h3 class=\"u-m-0 c-case-study-card__info-heading u-h4 u-wght-600\">";
            // line 15
            if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 15), "card_title", [], "any", false, false, false, 15) != "")) {
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 15), "card_title", [], "any", false, false, false, 15), "html", null, true);
            } else {
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 15), "html", null, true);
            }
            echo "</h3></div>
                            <div class=\"c-case-study-card__info-col u-visible-desktop\">
                                ";
            // line 17
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 17), "client_link", [], "any", false, false, false, 17)) {
                // line 18
                echo "                                    <a href=\"";
                echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 18), "client_link", [], "any", false, false, false, 18), "url", [], "any", false, false, false, 18);
                echo "\" title=\"";
                echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 18), "client_link", [], "any", false, false, false, 18), "url", [], "any", false, false, false, 18), "title", [], "any", false, false, false, 18);
                echo " testimonial\" class=\"c-case-study-card__info-client\">
                                ";
            } else {
                // line 20
                echo "                                    <div class=\"c-case-study-card__info-client\">
                                ";
            }
            // line 22
            echo "                                    <span>For</span> 
                                    ";
            // line 23
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "client", [], "any", false, false, false, 23), "avatar", [], "any", false, false, false, 23), "id", [], "any", false, false, false, 23)) {
                echo "<span class=\"c-case-study-card__info-avatar\">";
                echo twig_get_attribute($this->env, $this->source, ($context["fn"] ?? null), "wp_get_attachment_image", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "client", [], "any", false, false, false, 23), "avatar", [], "any", false, false, false, 23), "id", [], "any", false, false, false, 23), "avatar", false, ["class" => "u-responsive-image"]], "method", false, false, false, 23);
                echo "</span> ";
            }
            // line 24
            echo "                                    <span class=\"u-body-lg u-wght-500\">";
            echo twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "client", [], "any", false, false, false, 24), "title", [], "any", false, false, false, 24);
            echo " </span>
                                    ";
            // line 25
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 25), "client_link", [], "any", false, false, false, 25)) {
                echo " <span><svg width=\"16\" height=\"12\" viewBox=\"0 0 16 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M9.488 0L8.86709 0.702406L14.3286 5.53019H0V6.46769H14.3286L8.86709 11.2955L9.488 11.9979L16 6.24147V5.75641L9.488 0Z\" fill=\"#2B2B2B\"/> </svg></span>";
            }
            // line 26
            echo "                                ";
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 26), "client_link", [], "any", false, false, false, 26)) {
                // line 27
                echo "                                    </a>
                                ";
            } else {
                // line 29
                echo "                                    </div>
                                ";
            }
            // line 31
            echo "                            </div>
                        </div>
                        <div class=\"c-case-study-card__tags\">
                            ";
            // line 34
            if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 34), "tags", [], "any", false, false, false, 34)) {
                // line 35
                echo "                                <ul class=\"u-tags u-list-reset\">
                                    ";
                // line 36
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "meta", [], "any", false, false, false, 36), "tags", [], "any", false, false, false, 36));
                foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
                    // line 37
                    echo "                                        <li class=\"u-tag\">";
                    echo twig_get_attribute($this->env, $this->source, $context["item"], "name", [], "any", false, false, false, 37);
                    echo "</li>
                                    ";
                }
                $_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 "                                </ul>
                            ";
            }
            // line 41
            echo "                        </div>
                    </div>
                </div>
            </div>
        ";
        }
        $_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 "    </div>
</section>
";
    }

    public function getTemplateName()
    {
        return "parts/case-studies.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  160 => 46,  150 => 41,  146 => 39,  137 => 37,  133 => 36,  130 => 35,  128 => 34,  123 => 31,  119 => 29,  115 => 27,  112 => 26,  108 => 25,  103 => 24,  97 => 23,  94 => 22,  90 => 20,  82 => 18,  80 => 17,  71 => 15,  66 => 12,  62 => 11,  56 => 10,  52 => 8,  48 => 7,  41 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<section class=\"c-case-studies u-mb-md\">
    <header class=\"c-section-hdr c-section-hdr--sb u-gutters\">
        <h2 class=\"u-h-bul\">{{ heading|raw }}</h2>
        <a href=\"/case-studies\" class=\"c-btn u-visible-desktop\">View all Projects</a>
    </header>
    <div class=\"c-case-studies__grid u-gutters\">
        {% for item in list %}
            <div class=\"c-case-studies__grid-item\">
                <div class=\"c-case-study-card\">
                    <a href=\"{{ item.url }}\" title=\"View the {{ item.title|raw }} case study\" class=\"c-case-study-card__poster\">
                        {% if item.card_image %}{{ fn.wp_get_attachment_image( item.card_image.id, 'cs_card', false, {'class': 'u-object-image'})|raw }}{% endif %}
                    </a>
                    <div class=\"c-case-study-card__content\">
                        <div class=\"c-case-study-card__info\">
                            <div class=\"c-case-study-card__info-col\"><h3 class=\"u-m-0 c-case-study-card__info-heading u-h4 u-wght-600\">{% if item.meta.card_title != '' %}{{ item.meta.card_title }}{% else %}{{ item.title }}{% endif %}</h3></div>
                            <div class=\"c-case-study-card__info-col u-visible-desktop\">
                                {% if item.meta.client_link %}
                                    <a href=\"{{ item.meta.client_link.url|raw }}\" title=\"{{ item.meta.client_link.url.title|raw }} testimonial\" class=\"c-case-study-card__info-client\">
                                {% else %}
                                    <div class=\"c-case-study-card__info-client\">
                                {% endif %}
                                    <span>For</span> 
                                    {% if item.client.avatar.id %}<span class=\"c-case-study-card__info-avatar\">{{ fn.wp_get_attachment_image( item.client.avatar.id, 'avatar', false, {'class': 'u-responsive-image'})|raw }}</span> {% endif %}
                                    <span class=\"u-body-lg u-wght-500\">{{ item.client.title|raw }} </span>
                                    {% if item.meta.client_link %} <span><svg width=\"16\" height=\"12\" viewBox=\"0 0 16 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M9.488 0L8.86709 0.702406L14.3286 5.53019H0V6.46769H14.3286L8.86709 11.2955L9.488 11.9979L16 6.24147V5.75641L9.488 0Z\" fill=\"#2B2B2B\"/> </svg></span>{% endif %}
                                {% if item.meta.client_link %}
                                    </a>
                                {% else %}
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                        <div class=\"c-case-study-card__tags\">
                            {% if item.meta.tags %}
                                <ul class=\"u-tags u-list-reset\">
                                    {% for item in item.meta.tags %}
                                        <li class=\"u-tag\">{{ item.name|raw }}</li>
                                    {% endfor %}
                                </ul>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
        {% endfor %}
    </div>
</section>
", "parts/case-studies.twig", "/var/www/htdocs/content/themes/blank-theory/views/parts/case-studies.twig");
    }
}
