env, $this->getAttribute(($context["field"] ?? null), "class", array()), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->getAttribute(($context["field"] ?? null), "classes", array()), "html", null, true);
echo "\">
";
// line 3
if ($this->getAttribute(($context["field"] ?? null), "fields", array())) {
// line 4
echo "
";
// line 5
$context["tabsKey"] = twig_join_filter(twig_get_array_keys_filter($this->getAttribute(($context["field"] ?? null), "fields", array())), ".");
// line 6
echo " ";
$context["storedValue"] = $this->env->getExtension('Grav\Common\Twig\TwigExtension')->jsonDecodeFilter(_twig_default_filter($this->env->getExtension('Grav\Common\Twig\TwigExtension')->getCookie("grav-tabs-state"), "{}"));
// line 7
echo " ";
$context["storedTab"] = $this->getAttribute(($context["storedValue"] ?? null), ("tab-" . ($context["tabsKey"] ?? null)));
// line 8
echo "
";
// line 9
if (twig_test_empty(($context["storedTab"] ?? null))) {
// line 10
echo " ";
if ($this->getAttribute($this->getAttribute(($context["uri"] ?? null), "params", array()), "tab", array())) {
// line 11
echo " ";
$context["active"] = $this->getAttribute($this->getAttribute(($context["uri"] ?? null), "params", array()), "tab", array());
// line 12
echo " ";
} elseif ($this->getAttribute(($context["field"] ?? null), "active", array())) {
// line 13
echo " ";
$context["active"] = $this->getAttribute(($context["field"] ?? null), "active", array());
// line 14
echo " ";
} else {
// line 15
echo " ";
$context["active"] = 1;
// line 16
echo " ";
}
// line 17
echo " ";
}
// line 18
echo "
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["field"] ?? null), "fields", array()));
$context['loop'] = array(
'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["tab"]) {
// line 21
echo " ";
if ((($this->getAttribute($context["tab"], "type", array()) == "tab") && (twig_test_empty($this->getAttribute($context["tab"], "security", array())) || $this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize($this->env->getExtension('Grav\Common\Twig\TwigExtension')->arrayFunc($this->getAttribute($context["tab"], "security", array())))))) {
// line 22
echo "
getAttribute($context["tab"], "name", array()))) || (($context["active"] ?? null) == $this->getAttribute($context["loop"], "index", array())))) ? ("active") : (""));
echo "\" href=\"#\" data-tabid=\"tab-";
echo twig_escape_filter($this->env, (($context["tabsKey"] ?? null) . $this->getAttribute($context["loop"], "index", array())), "html", null, true);
echo "\" data-tabkey=\"tab-";
echo twig_escape_filter($this->env, ($context["tabsKey"] ?? null), "html", null, true);
echo "\" data-scope=\"";
echo twig_escape_filter($this->env, (($context["scope"] ?? null) . $this->getAttribute($context["tab"], "name", array())), "html", null, true);
echo "\">
";
// line 24
if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute(($context["grav"] ?? null), "twig", array(), "any", false, true), "twig", array(), "any", false, true), "filters", array(), "any", false, true), "tu", array(), "array", true, true)) {
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Plugin\Admin\AdminTwigExtension')->tuFilter($this->getAttribute($context["tab"], "title", array())), "html", null, true);
} else {
echo twig_escape_filter($this->env, $this->env->getExtension('Grav\Common\Twig\TwigExtension')->translate($this->getAttribute($context["tab"], "title", array())), "html", null, true);
}
// line 25
echo "
";
}
// line 28
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tab'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
echo "
";
// line 31
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($context["field"], "fields", array()));
$context['loop'] = array(
'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["field"]) {
// line 32
echo " ";
if (($this->getAttribute($context["field"], "type", array()) == "tab")) {
// line 33
echo " ";
if ((twig_test_empty($this->getAttribute($context["field"], "security", array())) || $this->env->getExtension('Grav\Common\Twig\TwigExtension')->authorize($this->env->getExtension('Grav\Common\Twig\TwigExtension')->arrayFunc($this->getAttribute($context["field"], "security", array()))))) {
// line 34
echo " ";
$context["value"] = (($this->getAttribute($context["field"], "name", array())) ? ($this->getAttribute(($context["data"] ?? null), "value", array(0 => $this->getAttribute($context["field"], "name", array())), "method")) : ($this->getAttribute(($context["data"] ?? null), "toArray", array())));
// line 35
echo "
env, (($context["tabsKey"] ?? null) . $this->getAttribute($context["loop"], "index", array())), "html", null, true);
echo "\" class=\"tab__content ";
echo ((((($context["storedTab"] ?? null) == (($context["scope"] ?? null) . $this->getAttribute($context["field"], "name", array()))) || (($context["active"] ?? null) == $this->getAttribute($context["loop"], "index", array())))) ? ("active") : (""));
echo "\">
";
// line 36
$this->loadTemplate(array(0 => (((("forms/fields/" . $this->getAttribute($context["field"], "type", array())) . "/") . $this->getAttribute($context["field"], "type", array())) . ".html.twig"), 1 => "forms/fields/text/text.html.twig"), "forms/fields/tabs/tabs.html.twig", 36)->display($context);
// line 37
echo "
";
}
// line 39
echo " ";
}
// line 40
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
echo "