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

/* @SuluWebsite/Extension/seo.html.twig */
class __TwigTemplate_06e7e8bdface1fbfc7d5737f78c0c4e6 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 = [
            'title' => [$this, 'block_title'],
            'description' => [$this, 'block_description'],
            'keywords' => [$this, 'block_keywords'],
            'robots' => [$this, 'block_robots'],
            'urls' => [$this, 'block_urls'],
            'canonical' => [$this, 'block_canonical'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 8
        if ((($tmp =  !array_key_exists("localizations", $context)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 9
            yield "    ";
            trigger_deprecation('', '', "The \"urls\" variable is deprecated, set \"localizations\" instead in the \"seo.html.twig\"."." in \"@SuluWebsite/Extension/seo.html.twig\" at line 9.");
            // line 10
            yield "    ";
            $context["localizations"] = [];
            // line 11
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["urls"] ?? null));
            foreach ($context['_seq'] as $context["locale"] => $context["url"]) {
                // line 12
                yield "        ";
                $context["localizations"] = Twig\Extension\CoreExtension::merge(($context["localizations"] ?? null), [ (string)                // line 13
$context["locale"] => ["locale" =>                 // line 14
$context["locale"], "url" => $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(                // line 15
$context["url"], null, $context["locale"])]]);
                // line 18
                yield "    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['locale'], $context['url'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 22
        $context["seo"] = Twig\Extension\CoreExtension::merge(((array_key_exists("seo", $context)) ? (Twig\Extension\CoreExtension::default(($context["seo"] ?? null), [])) : ([])), ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, true, false, 22), "attributes", [], "any", false, true, false, 22), "get", ["_seo", []], "method", true, true, false, 22)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 22), "attributes", [], "any", false, false, false, 22), "get", ["_seo", []], "method", false, false, false, 22), [])) : ([])));
        // line 25
        $context["seoTitle"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "title", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "title", [], "any", false, false, false, 25), ((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", false, false, false, 25))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["content"] ?? null), "title", [], "any", false, false, false, 25))) : (""))));
        // line 26
        $context["seoDescription"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "description", [], "any", true, true, false, 26)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "description", [], "any", false, false, false, 26))) : (""));
        // line 27
        $context["seoKeywords"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "keywords", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "keywords", [], "any", false, false, false, 27))) : (""));
        // line 28
        yield "
";
        // line 29
        $context["seoRobots"] = "";
        // line 30
        if ((($tmp = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "noIndex", [], "any", true, true, false, 30)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "noIndex", [], "any", false, false, false, 30), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 31
            $context["seoRobots"] = (($context["seoRobots"] ?? null) . "noIndex");
        } else {
            // line 33
            $context["seoRobots"] = (($context["seoRobots"] ?? null) . "index");
        }
        // line 35
        if ((($tmp = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "noFollow", [], "any", true, true, false, 35)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "noFollow", [], "any", false, false, false, 35), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 36
            $context["seoRobots"] = (($context["seoRobots"] ?? null) . ",noFollow");
        } else {
            // line 38
            $context["seoRobots"] = (($context["seoRobots"] ?? null) . ",follow");
        }
        // line 41
        $context["seoCanonical"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "canonicalUrl", [], "any", true, true, false, 41)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["seo"] ?? null), "canonicalUrl", [], "any", false, false, false, 41))) : (""));
        // line 43
        if ((( !($context["seoCanonical"] ?? null) && ($context["shadowBaseLocale"] ?? null)) && ((CoreExtension::getAttribute($this->env, $this->source, ($context["localizations"] ?? null), ($context["shadowBaseLocale"] ?? null), [], "array", true, true, false, 43)) ? (Twig\Extension\CoreExtension::default((($_v0 = ($context["localizations"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0[($context["shadowBaseLocale"] ?? null)] ?? null) : null))) : ("")))) {
            // line 44
            yield "    ";
            $context["seoCanonical"] = CoreExtension::getAttribute($this->env, $this->source, (($_v1 = ($context["localizations"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1[($context["shadowBaseLocale"] ?? null)] ?? null) : null), "url", [], "any", false, false, false, 44);
        }
        // line 49
        yield from $this->unwrap()->yieldBlock('title', $context, $blocks);
        // line 55
        yield from $this->unwrap()->yieldBlock('description', $context, $blocks);
        // line 61
        yield from $this->unwrap()->yieldBlock('keywords', $context, $blocks);
        // line 67
        yield from $this->unwrap()->yieldBlock('robots', $context, $blocks);
        // line 73
        yield from $this->unwrap()->yieldBlock('urls', $context, $blocks);
        // line 84
        yield from $this->unwrap()->yieldBlock('canonical', $context, $blocks);
        yield from [];
    }

    // line 49
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 50
        if ((($tmp = ($context["seoTitle"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 51
            yield "<title>";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["seoTitle"] ?? null), "html", null, true);
            yield "</title>";
        }
        yield from [];
    }

    // line 55
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_description(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 56
        if ((($tmp = ($context["seoDescription"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 57
            yield "<meta name=\"description\" content=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["seoDescription"] ?? null), "html", null, true);
            yield "\">";
        }
        yield from [];
    }

    // line 61
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_keywords(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 62
        if ((($tmp = ($context["seoKeywords"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 63
            yield "<meta name=\"keywords\" content=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["seoKeywords"] ?? null), "html", null, true);
            yield "\">";
        }
        yield from [];
    }

    // line 67
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_robots(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 68
        if ((($tmp = ($context["seoRobots"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 69
            yield "<meta name=\"robots\" content=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["seoRobots"] ?? null), "html", null, true);
            yield "\">";
        }
        yield from [];
    }

    // line 73
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_urls(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 75
        if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["localizations"] ?? null)) > 1)) {
            // line 76
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(($context["localizations"] ?? null));
            foreach ($context['_seq'] as $context["_key"] => $context["localization"]) {
                // line 77
                if (( !CoreExtension::getAttribute($this->env, $this->source, $context["localization"], "alternate", [], "any", true, true, false, 77) || CoreExtension::getAttribute($this->env, $this->source, $context["localization"], "alternate", [], "any", false, false, false, 77))) {
                    // line 78
                    yield "<link rel=\"alternate\" href=\"";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["localization"], "url", [], "any", false, false, false, 78), "html", null, true);
                    yield "\" hreflang=\"";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::replace(CoreExtension::getAttribute($this->env, $this->source, $context["localization"], "locale", [], "any", false, false, false, 78), ["_" => "-"]), "html", null, true);
                    yield "\">";
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['localization'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        yield from [];
    }

    // line 84
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_canonical(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 86
        yield "<link rel=\"canonical\" href=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("seoCanonical", $context)) ? (Twig\Extension\CoreExtension::default(($context["seoCanonical"] ?? null), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 86), "uri", [], "any", false, false, false, 86))) : (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 86), "uri", [], "any", false, false, false, 86))), "html", null, true);
        yield "\">";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "@SuluWebsite/Extension/seo.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  231 => 86,  224 => 84,  209 => 78,  207 => 77,  203 => 76,  201 => 75,  194 => 73,  186 => 69,  184 => 68,  177 => 67,  169 => 63,  167 => 62,  160 => 61,  152 => 57,  150 => 56,  143 => 55,  135 => 51,  133 => 50,  126 => 49,  121 => 84,  119 => 73,  117 => 67,  115 => 61,  113 => 55,  111 => 49,  107 => 44,  105 => 43,  103 => 41,  100 => 38,  97 => 36,  95 => 35,  92 => 33,  89 => 31,  87 => 30,  85 => 29,  82 => 28,  80 => 27,  78 => 26,  76 => 25,  74 => 22,  67 => 18,  65 => 15,  64 => 14,  63 => 13,  61 => 12,  56 => 11,  53 => 10,  50 => 9,  48 => 8,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "@SuluWebsite/Extension/seo.html.twig", "C:\\xampp\\htdocs\\taiafropressapi\\vendor\\sulu\\sulu\\src\\Sulu\\Bundle\\WebsiteBundle\\Resources\\views\\Extension\\seo.html.twig");
    }
}
