<?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/organisms/tabs/tabs.html.twig */
class __TwigTemplate_08abbaae752871bf3942d54fb619d3d6 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 = [
'entry' => [$this, 'block_entry'],
'entryContent' => [$this, 'block_entryContent'],
];
}
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/organisms/tabs/tabs.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/organisms/tabs/tabs.html.twig"));
// line 1
$context["string"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 1, $this->source); })()), "request", [], "any", false, false, false, 1), "cookies", [], "any", false, false, false, 1), "get", ["last-seen"], "method", false, false, false, 1);
// line 2
yield "<div class=\"tabs ";
if ((($tmp = ((array_key_exists("background", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["background"]) || array_key_exists("background", $context) ? $context["background"] : (function () { throw new RuntimeError('Variable "background" does not exist.', 2, $this->source); })()))) : (""))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield " tabs--";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["background"]) || array_key_exists("background", $context) ? $context["background"] : (function () { throw new RuntimeError('Variable "background" does not exist.', 2, $this->source); })()), "html", null, true);
}
yield "\">
<div class=\"tabs__inner\">
";
// line 4
if (array_key_exists("headline", $context)) {
// line 5
yield " <div class=\"tabs__headline\">
";
// line 6
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["headline"]) || array_key_exists("headline", $context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.', 6, $this->source); })()));
yield "
</div>
";
}
// line 9
yield "
";
// line 10
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 10, $this->source); })())) > 0)) {
// line 11
yield " <div class=\"tabs__entries\" role=\"radiogroup\" aria-label=\"Tabs\">
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 12, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 13
yield " ";
yield from $this->unwrap()->yieldBlock('entry', $context, $blocks);
// line 20
yield " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 21
yield " <div class=\"tabs__scroll\">
";
// line 22
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 22, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 23
yield "
";
// line 24
if (((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "component", [], "any", false, false, false, 24) != "last-seen-product-slider") || ( !(null === (isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 24, $this->source); })())) && !Twig\Extension\CoreExtension::testEmpty((isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 24, $this->source); })()))))) {
// line 25
yield " ";
$context["id"] = ((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "_uid", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "_uid", [], "any", false, false, false, 25), ((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 25))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", true, true, false, 25)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "id", [], "any", false, false, false, 25))) : (""))));
// line 26
yield " <label for=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 26, $this->source); })()), "html", null, true);
yield "\" class=\"tabs__entry-label tabs__headline\">
";
// line 27
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), "text", [], "any", false, false, false, 27), ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), 0, [], "array", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "text", [], "any", false, false, false, 27))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, true, false, 27), 0, [], "array", false, true, false, 27), "text", [], "any", true, true, false, 27)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["entry"], "headline", [], "any", false, false, false, 27), 0, [], "array", false, false, false, 27), "text", [], "any", false, false, false, 27))) : ("")))), "html", null, true);
yield "
</label>
";
}
// line 30
yield "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 32
yield " </div>
";
// line 33
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["entries"]) || array_key_exists("entries", $context) ? $context["entries"] : (function () { throw new RuntimeError('Variable "entries" does not exist.', 33, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
// line 34
yield " <div class=\"tabs__content tabs__content--position\" >
";
// line 35
yield from $this->unwrap()->yieldBlock('entryContent', $context, $blocks);
// line 44
yield " </div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
yield " </div>
";
}
// line 48
yield " </div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
// line 13
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_entry(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", "entry"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entry"));
// line 14
yield " ";
if (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 14, $this->source); })()), "component", [], "any", false, false, false, 14) != "last-seen-product-slider") || ( !(null === (isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 14, $this->source); })())) && !Twig\Extension\CoreExtension::testEmpty((isset($context["string"]) || array_key_exists("string", $context) ? $context["string"] : (function () { throw new RuntimeError('Variable "string" does not exist.', 14, $this->source); })()))))) {
// line 15
yield " ";
$context["id"] = ((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "_uid", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "_uid", [], "any", false, false, false, 15), ((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "id", [], "any", false, false, false, 15))) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["entry"] ?? null), "id", [], "any", true, true, false, 15)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 15, $this->source); })()), "id", [], "any", false, false, false, 15))) : (""))));
// line 16
yield " <input class=\"tabs__input\" type=\"radio\" id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["id"]) || array_key_exists("id", $context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.', 16, $this->source); })()), "html", null, true);
yield "\" name=\"css-tabs-";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("_uid", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["_uid"]) || array_key_exists("_uid", $context) ? $context["_uid"] : (function () { throw new RuntimeError('Variable "_uid" does not exist.', 16, $this->source); })()))) : ("")), "html", null, true);
yield "\" ";
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["loop"]) || array_key_exists("loop", $context) ? $context["loop"] : (function () { throw new RuntimeError('Variable "loop" does not exist.', 16, $this->source); })()), "index", [], "any", false, false, false, 16) == 1)) {
yield "checked ";
}
yield ">
";
} else {
// line 18
yield " ";
}
// line 19
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 35
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_entryContent(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", "entryContent"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "entryContent"));
// line 36
yield " ";
if ((array_key_exists("html_content", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["html_content"]) || array_key_exists("html_content", $context) ? $context["html_content"] : (function () { throw new RuntimeError('Variable "html_content" does not exist.', 36, $this->source); })())))) {
// line 37
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["html_content"]) || array_key_exists("html_content", $context) ? $context["html_content"] : (function () { throw new RuntimeError('Variable "html_content" does not exist.', 37, $this->source); })()), "html", null, true);
yield "
";
} else {
// line 39
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["entry"]) || array_key_exists("entry", $context) ? $context["entry"] : (function () { throw new RuntimeError('Variable "entry" does not exist.', 39, $this->source); })()), ["headline" => []]);
// line 41
yield "
";
}
// line 43
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "components/organisms/tabs/tabs.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 279 => 43, 275 => 41, 272 => 39, 266 => 37, 263 => 36, 250 => 35, 239 => 19, 236 => 18, 224 => 16, 221 => 15, 218 => 14, 205 => 13, 191 => 48, 187 => 46, 172 => 44, 170 => 35, 167 => 34, 150 => 33, 147 => 32, 140 => 30, 134 => 27, 129 => 26, 126 => 25, 124 => 24, 121 => 23, 117 => 22, 114 => 21, 100 => 20, 97 => 13, 80 => 12, 77 => 11, 75 => 10, 72 => 9, 66 => 6, 63 => 5, 61 => 4, 52 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set string = app.request.cookies.get('last-seen') %}
<div class=\"tabs {% if background|default %} tabs--{{ background }}{% endif %}\">
<div class=\"tabs__inner\">
{% if headline is defined %}
<div class=\"tabs__headline\">
{{ render_storyblok(headline) }}
</div>
{% endif %}
{% if entries|length > 0 %}
<div class=\"tabs__entries\" role=\"radiogroup\" aria-label=\"Tabs\">
{% for entry in entries %}
{% block entry %}
{% if entry.component != 'last-seen-product-slider' or string is not null and string is not empty%}
{% set id = entry._uid|default(entry.id|default()) %}
<input class=\"tabs__input\" type=\"radio\" id=\"{{ id }}\" name=\"css-tabs-{{ _uid|default }}\" {% if (loop.index == 1) %}checked {% endif %}>
{% else %}
{% endif %}
{% endblock %}
{% endfor %}
<div class=\"tabs__scroll\">
{% for entry in entries %}
{% if entry.component != 'last-seen-product-slider' or string is not null and string is not empty%}
{% set id = entry._uid|default(entry.id|default()) %}
<label for=\"{{ id }}\" class=\"tabs__entry-label tabs__headline\">
{{ entry.headline.text|default(entry.headline[0].text|default) }}
</label>
{% endif %}
{% endfor %}
</div>
{% for entry in entries %}
<div class=\"tabs__content tabs__content--position\" >
{% block entryContent %}
{% if html_content is defined and html_content is not empty %}
{{ html_content }}
{% else %}
{{ render_storyblok(entry, {
'headline': [],
}) }}
{% endif %}
{% endblock %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
", "components/organisms/tabs/tabs.html.twig", "/var/www/html/templates/default/components/organisms/tabs/tabs.html.twig");
}
}