<?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;
/* components/atoms/text-link/text-link.html.twig */
class __TwigTemplate_d08b2d2e3cb251b8654f0bfa5d2e1d8e 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 = [
'linkText' => [$this, 'block_linkText'],
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "components/atoms/text-link/text-link.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/atoms/text-link/text-link.html.twig"));
// line 1
$macros["storyblok"] = $this->macros["storyblok"] = $this->load("macros/storyblok.html.twig", 1)->unwrap();
// line 2
yield "
";
// line 3
if ((((array_key_exists("reserveBoldSpace", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["reserveBoldSpace"]) || array_key_exists("reserveBoldSpace", $context) ? $context["reserveBoldSpace"] : (function () { throw new RuntimeError('Variable "reserveBoldSpace" does not exist.', 3, $this->source); })()), false)) : (false)) && array_key_exists("text", $context))) {
// line 4
yield " ";
$context["attributes"] = Twig\Extension\CoreExtension::merge(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 4, $this->source); })()), [])) : ([])), ["data-reserve-bold-space" => (isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 4, $this->source); })())]);
}
// line 6
yield "
";
// line 7
$context["inner"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
// line 8
yield " ";
yield from $this->unwrap()->yieldBlock('linkText', $context, $blocks);
// line 11
yield "
";
// line 13
yield " ";
if ((array_key_exists("class", $context) && CoreExtension::inFilter("arrow", (isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 13, $this->source); })())))) {
// line 14
yield " <span class=\"text-link__arrow\"></span>
";
}
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
// line 17
yield "
";
// line 18
if ((($tmp = ((array_key_exists("href", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["href"]) || array_key_exists("href", $context) ? $context["href"] : (function () { throw new RuntimeError('Variable "href" does not exist.', 18, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 19
yield " <a
href=\"";
// line 20
yield Twig\Extension\CoreExtension::spaceless($macros["storyblok"]->getTemplateForMacro("macro_storyblokLink", $context, 20, $this->getSourceContext())->macro_storyblokLink(...[(isset($context["href"]) || array_key_exists("href", $context) ? $context["href"] : (function () { throw new RuntimeError('Variable "href" does not exist.', 20, $this->source); })())]));
yield "\"
";
// line 21
if ((array_key_exists("target", $context) && ((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 21, $this->source); })()) != ""))) {
yield "target=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 21, $this->source); })()), "html", null, true);
yield "\"";
}
// line 22
yield " class=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 22, $this->source); })()), "text-link")) : ("text-link")), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("modifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["modifier"]) || array_key_exists("modifier", $context) ? $context["modifier"] : (function () { throw new RuntimeError('Variable "modifier" does not exist.', 22, $this->source); })()), "")) : ("")), "html", null, true);
yield "\"
";
// line 23
yield $this->extensions['App\Twig\Filters\AttributesExtension']->componentAttributes(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 23, $this->source); })()), [])) : ([])));
yield "
";
// line 24
yield (((($tmp = ((array_key_exists("gtm", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 24, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 24, $this->source); })()), "html", null, true)) : (""));
yield "
>
";
// line 26
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 26, $this->source); })()), "html", null, true);
yield "
</a>
";
} else {
// line 29
yield " <span class=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 29, $this->source); })()), "text-link")) : ("text-link")), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("modifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["modifier"]) || array_key_exists("modifier", $context) ? $context["modifier"] : (function () { throw new RuntimeError('Variable "modifier" does not exist.', 29, $this->source); })()), "")) : ("")), "html", null, true);
yield "\" ";
yield $this->extensions['App\Twig\Filters\AttributesExtension']->componentAttributes(((array_key_exists("attributes", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["attributes"]) || array_key_exists("attributes", $context) ? $context["attributes"] : (function () { throw new RuntimeError('Variable "attributes" does not exist.', 29, $this->source); })()), [])) : ([])));
yield " ";
yield (((($tmp = ((array_key_exists("gtm", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 29, $this->source); })()), false)) : (false))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["gtm"]) || array_key_exists("gtm", $context) ? $context["gtm"] : (function () { throw new RuntimeError('Variable "gtm" does not exist.', 29, $this->source); })()), "html", null, true)) : (""));
yield ">
";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 30, $this->source); })()), "html", null, true);
yield "
</span>
";
}
// line 33
yield "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
// line 8
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_linkText(array $context, array $blocks = []): iterable
{
$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", "linkText"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "linkText"));
// line 9
yield (isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 9, $this->source); })());
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "components/atoms/text-link/text-link.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 162 => 9, 149 => 8, 137 => 33, 131 => 30, 120 => 29, 114 => 26, 109 => 24, 105 => 23, 98 => 22, 92 => 21, 88 => 20, 85 => 19, 83 => 18, 80 => 17, 74 => 14, 71 => 13, 68 => 11, 65 => 8, 63 => 7, 60 => 6, 56 => 4, 54 => 3, 51 => 2, 49 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% import 'macros/storyblok.html.twig' as storyblok %}
{% if reserveBoldSpace|default(false) and text is defined %}
{% set attributes = attributes|default([])|merge({'data-reserve-bold-space': text}) %}
{% endif %}
{% set inner %}
{% block linkText %}
{{- text|raw -}}
{% endblock %}
{# check if class is defined and if a arrow modifier was set (inline-arrow or arrow-right) #}
{% if class is defined and 'arrow' in class %}
<span class=\"text-link__arrow\"></span>
{% endif %}
{% endset %}
{% if href|default(false) %}
<a
href=\"{{ storyblok.storyblokLink(href)|spaceless }}\"
{% if target is defined and target != \"\" %}target=\"{{ target }}\"{% endif %}
class=\"{{ class|default('text-link') }} {{ modifier|default('') }}\"
{{ attributes|default([])|getAttributes }}
{{ (gtm|default(false) ? gtm : '') }}
>
{{ inner }}
</a>
{% else %}
<span class=\"{{ class|default('text-link') }} {{ modifier|default('') }}\" {{ attributes|default([])|getAttributes }} {{ (gtm|default(false) ? gtm : '') }}>
{{ inner }}
</span>
{% endif %}
", "components/atoms/text-link/text-link.html.twig", "/var/www/html/templates/default/components/atoms/text-link/text-link.html.twig");
}
}