<?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;
/* modules/search-widget/main-results.html.twig */
class __TwigTemplate_f78a13601df627da0f72aec43f8e6c8c 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 = [
];
}
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", "modules/search-widget/main-results.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "modules/search-widget/main-results.html.twig"));
// line 2
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 2, $this->source); })()), "journey", [], "any", false, false, false, 2)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 3
yield "<div id=\"is-Journey-Results\" class=\"is-WidgetResults";
if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 3, $this->source); })()) != "journey")) {
yield " is-hide";
}
yield "\"
aria-live=\"polite\" tabindex=\"-1\">
";
// line 5
yield from $this->load("modules/search-widget/journey/mode-header.html.twig", 5)->unwrap()->yield($context);
// line 6
yield "</div>
";
}
// line 8
yield "
";
// line 9
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 9, $this->source); })()), "schedule", [], "any", false, false, false, 9)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 10
yield "<div id=\"is-Schedule-Results\" class=\"is-WidgetResults ";
if ((((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 10, $this->source); })()) != "schedule") || ((array_key_exists("displayScheduleFavorites", $context) && !(isset($context["displayScheduleFavorites"]) || array_key_exists("displayScheduleFavorites", $context) ? $context["displayScheduleFavorites"] : (function () { throw new RuntimeError('Variable "displayScheduleFavorites" does not exist.', 10, $this->source); })())) && (array_key_exists("isRedirection", $context) || array_key_exists("directLink", $context))))) {
yield " is-hide";
}
yield "\">
";
// line 11
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_REMEMBERED")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 12
yield " ";
yield from $this->load("modules/search-widget/schedule/favorites.html.twig", 12)->unwrap()->yield($context);
// line 13
yield " ";
}
// line 14
yield "
";
// line 15
if (((((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 15, $this->source); })()) == "schedule") && array_key_exists("isXmlHttpMode", $context)) && !(isset($context["isXmlHttpMode"]) || array_key_exists("isXmlHttpMode", $context) ? $context["isXmlHttpMode"] : (function () { throw new RuntimeError('Variable "isXmlHttpMode" does not exist.', 15, $this->source); })()))) {
// line 16
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["validator"]) || array_key_exists("validator", $context) ? $context["validator"] : (function () { throw new RuntimeError('Variable "validator" does not exist.', 16, $this->source); })()), "error", [], "any", false, false, false, 16) == 1)) {
// line 17
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["validator"]) || array_key_exists("validator", $context) ? $context["validator"] : (function () { throw new RuntimeError('Variable "validator" does not exist.', 17, $this->source); })()), "errors", [], "any", false, false, false, 17));
foreach ($context['_seq'] as $context["_key"] => $context["error"]) {
// line 18
yield " <div class=\"is-Alert is-Alert_Warning\" role=\"alert\">
<i class=\"is-Icon is-Icon-com-alert-triangle\"></i> ";
// line 19
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["error"], "message", [], "any", false, false, false, 19), "html", null, true);
yield "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['error'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 22
yield " ";
} else {
// line 23
yield " ";
if ((array_key_exists("scheduleTemplate", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["scheduleTemplate"]) || array_key_exists("scheduleTemplate", $context) ? $context["scheduleTemplate"] : (function () { throw new RuntimeError('Variable "scheduleTemplate" does not exist.', 23, $this->source); })())))) {
// line 24
yield " ";
yield from $this->load((("modules/search-widget/schedule/" . (isset($context["scheduleTemplate"]) || array_key_exists("scheduleTemplate", $context) ? $context["scheduleTemplate"] : (function () { throw new RuntimeError('Variable "scheduleTemplate" does not exist.', 24, $this->source); })())) . ".html.twig"), 24)->unwrap()->yield($context);
// line 25
yield " ";
}
// line 26
yield " ";
}
// line 27
yield " ";
}
// line 28
yield "</div>
";
}
// line 30
yield "
";
// line 31
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 31, $this->source); })()), "traffic", [], "any", false, false, false, 31)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 32
yield " <div id=\"is-TrafficInfos-Results\" class=\"is-WidgetResults";
if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 32, $this->source); })()) != "traffic")) {
yield " is-hide";
}
yield "\" aria-live=\"polite\" tabindex=\"-1\">
";
// line 33
if ((( !array_key_exists("displayDisruptionWithAjax", $context) || (false == (isset($context["displayDisruptionWithAjax"]) || array_key_exists("displayDisruptionWithAjax", $context) ? $context["displayDisruptionWithAjax"] : (function () { throw new RuntimeError('Variable "displayDisruptionWithAjax" does not exist.', 33, $this->source); })()))) || ((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 33, $this->source); })()) == "traffic"))) {
// line 34
yield " ";
if ((array_key_exists("trafficMini", $context) && (isset($context["trafficMini"]) || array_key_exists("trafficMini", $context) ? $context["trafficMini"] : (function () { throw new RuntimeError('Variable "trafficMini" does not exist.', 34, $this->source); })()))) {
// line 35
yield " ";
yield from $this->load("modules/search-widget/traffic-infos/mini.html.twig", 35)->unwrap()->yield($context);
// line 36
yield " ";
} else {
// line 37
yield " ";
yield from $this->load("modules/search-widget/traffic-infos/traffic-result.html.twig", 37)->unwrap()->yield($context);
// line 38
yield " ";
}
// line 39
yield " ";
}
// line 40
yield " </div>
";
}
// line 42
yield "
";
// line 43
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["activeWidgets"] ?? null), "linesAndPoi", [], "any", true, true, false, 43) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["activeWidgets"]) || array_key_exists("activeWidgets", $context) ? $context["activeWidgets"] : (function () { throw new RuntimeError('Variable "activeWidgets" does not exist.', 43, $this->source); })()), "linesAndPoi", [], "any", false, false, false, 43))) {
// line 44
yield " <div id=\"is-LinesAndPoi-Results\" class=\"is-WidgetResults";
if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 44, $this->source); })()) != "interactiveMap")) {
yield " is-hide";
}
yield "\" aria-live=\"polite\" tabindex=\"-1\">
";
// line 45
if (((isset($context["activeTab"]) || array_key_exists("activeTab", $context) ? $context["activeTab"] : (function () { throw new RuntimeError('Variable "activeTab" does not exist.', 45, $this->source); })()) == "interactiveMap")) {
// line 46
yield " ";
yield from $this->load("modules/search-widget/interactive-map/form.html.twig", 46)->unwrap()->yield($context);
// line 47
yield " ";
}
// line 48
yield " </div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "modules/search-widget/main-results.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 187 => 48, 184 => 47, 181 => 46, 179 => 45, 172 => 44, 170 => 43, 167 => 42, 163 => 40, 160 => 39, 157 => 38, 154 => 37, 151 => 36, 148 => 35, 145 => 34, 143 => 33, 136 => 32, 134 => 31, 131 => 30, 127 => 28, 124 => 27, 121 => 26, 118 => 25, 115 => 24, 112 => 23, 109 => 22, 100 => 19, 97 => 18, 92 => 17, 89 => 16, 87 => 15, 84 => 14, 81 => 13, 78 => 12, 76 => 11, 69 => 10, 67 => 9, 64 => 8, 60 => 6, 58 => 5, 50 => 3, 48 => 2,);
}
public function getSourceContext(): Source
{
return new Source("{#{% set activeTab = 'schedule' %}#}
{% if activeWidgets.journey %}
<div id=\"is-Journey-Results\" class=\"is-WidgetResults{% if activeTab != 'journey' %} is-hide{% endif %}\"
aria-live=\"polite\" tabindex=\"-1\">
{% include \"modules/search-widget/journey/mode-header.html.twig\" %}
</div>
{% endif %}
{% if activeWidgets.schedule %}
<div id=\"is-Schedule-Results\" class=\"is-WidgetResults {% if activeTab != 'schedule' or displayScheduleFavorites is defined and not displayScheduleFavorites and (isRedirection is defined or directLink is defined) %} is-hide{% endif %}\">
{% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
{% include \"modules/search-widget/schedule/favorites.html.twig\" %}
{% endif %}
{% if activeTab == 'schedule' and isXmlHttpMode is defined and not isXmlHttpMode %}
{% if validator.error == 1 %}
{% for error in validator.errors %}
<div class=\"is-Alert is-Alert_Warning\" role=\"alert\">
<i class=\"is-Icon is-Icon-com-alert-triangle\"></i> {{ error.message }}
</div>
{% endfor %}
{% else %}
{% if scheduleTemplate is defined and scheduleTemplate is not empty %}
{% include \"modules/search-widget/schedule/\" ~ scheduleTemplate ~ \".html.twig\" %}
{% endif %}
{% endif %}
{% endif %}
</div>
{% endif %}
{% if activeWidgets.traffic %}
<div id=\"is-TrafficInfos-Results\" class=\"is-WidgetResults{% if activeTab != 'traffic' %} is-hide{% endif %}\" aria-live=\"polite\" tabindex=\"-1\">
{% if (displayDisruptionWithAjax is not defined or false == displayDisruptionWithAjax or activeTab == 'traffic') %}
{% if trafficMini is defined and trafficMini %}
{% include \"modules/search-widget/traffic-infos/mini.html.twig\" %}
{% else %}
{% include \"modules/search-widget/traffic-infos/traffic-result.html.twig\" %}
{% endif %}
{% endif %}
</div>
{% endif %}
{% if activeWidgets.linesAndPoi is defined and activeWidgets.linesAndPoi %}
<div id=\"is-LinesAndPoi-Results\" class=\"is-WidgetResults{% if activeTab != 'interactiveMap' %} is-hide{% endif %}\" aria-live=\"polite\" tabindex=\"-1\">
{% if (activeTab == 'interactiveMap') %}
{% include \"modules/search-widget/interactive-map/form.html.twig\" %}
{% endif %}
</div>
{% endif %}
", "modules/search-widget/main-results.html.twig", "/var/www/html/templates/modules/search-widget/main-results.html.twig");
}
}