<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* website/includes/search-form-section.html.twig */
class __TwigTemplate_afa00d553788ca6f404ebb114b12d47be7adb1b0061f65cd830ff30f431b0e9f extends Template
{
private $source;
private $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 = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "website/includes/search-form-section.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "website/includes/search-form-section.html.twig"));
// line 1
$macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"] = $this->macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"] = $this->loadTemplate("utils.html.twig", "website/includes/search-form-section.html.twig", 1)->unwrap();
// line 2
echo "<form class=\"busca\" action=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("productListSearch");
echo "\" method=\"GET\">
";
// line 3
if ((( !(isset($context["isDarkTheme"]) || array_key_exists("isDarkTheme", $context) ? $context["isDarkTheme"] : (function () { throw new RuntimeError('Variable "isDarkTheme" does not exist.', 3, $this->source); })()) && (isset($context["hasProducts"]) || array_key_exists("hasProducts", $context) ? $context["hasProducts"] : (function () { throw new RuntimeError('Variable "hasProducts" does not exist.', 3, $this->source); })())) && (1 === twig_compare(twig_length_filter($this->env, (isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 3, $this->source); })())), 0)))) {
// line 4
echo " <button type=\"button\" id=\"btn_categorias\" class=\"btn-categorias\">
<i class=\"ico\">";
// line 5
echo twig_call_macro($macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"], "macro_ico", ["apps"], 5, $context, $this->getSourceContext());
echo "</i>
<span>";
// line 6
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("categories", "search_form"), "html", null, true);
echo "</span>
<i class=\"ico\">";
// line 7
echo twig_call_macro($macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"], "macro_ico", ["chevron-down"], 7, $context, $this->getSourceContext());
echo "</i>
</button>
<div class=\"box-categorias\">
<div>
";
// line 11
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["categories"]) || array_key_exists("categories", $context) ? $context["categories"] : (function () { throw new RuntimeError('Variable "categories" does not exist.', 11, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 12
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["category"], "hasProduct", [], "method", false, false, false, 12)) {
// line 13
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("productListCategory", ["type" => "produtos", "slug" => twig_get_attribute($this->env, $this->source, $context["category"], "slug", [], "any", false, false, false, 13)]), "html", null, true);
echo "\">
";
// line 14
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["category"], "category", [], "any", false, false, false, 14), "html", null, true);
echo "
</a>
";
}
// line 17
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 18
echo " </div>
</div>
";
}
// line 21
echo " <input type=\"text\" id=\"search\" name=\"search\" placeholder=\"";
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("course_to_study", "search_form"), "html", null, true);
echo "\" autocomplete=\"off\">
<button type=\"submit\" class=\"btn-buscar\">
<i>";
// line 23
echo twig_call_macro($macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"], "macro_ico", ["search"], 23, $context, $this->getSourceContext());
echo "</i>
</button>
<div id=\"search_suggestions\" class=\"search-suggestions\" data-status=\"start\" request=\"";
// line 25
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("productListSuggestionSearch");
echo "\">
<span class=\"item item-start\">
<i class=\"type-search\"></i>
<span>";
// line 29
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("course_to_study", "search_form"), "html", null, true);
echo "</span>
</span>
<span class=\"item item-wait\">
<i class=\"type-search\"></i>
<span>";
// line 34
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("searching_for", "search_form"), "html", null, true);
echo " <b class=\"js--search-term\">…</b></span>
</span>
<span class=\"item item-end-empty\">
<i class=\"type-search\"></i>
<span>";
// line 39
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("no_results_for", "search_form"), "html", null, true);
echo " <b class=\"js--search-term\">…</b></span>
</span>
<a id=\"init_link\" class=\"item item-end-full\" href=\"\">
<i class=\"type-search\"></i>
<span>";
// line 44
echo twig_escape_filter($this->env, $this->extensions['EADPlataforma\Twig\FunctionsExtension']->getLanguage("see_all_courses_with", "search_form"), "html", null, true);
echo " <b class=\"js--search-term\">…</b></span>
</a>
<div class=\"loader-container\">
<i class=\"loader\">";
// line 48
echo twig_call_macro($macros["__internal_b338744bdc6e4444a2355805afb5237c7bc29cd323930e7491be4f32beb3f403"], "macro_ico", ["loader-wish"], 48, $context, $this->getSourceContext());
echo "</i>
</div>
<nav id=\"search_suggestions_links\" class=\"found-links\"></nav>
</div>
</form>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "website/includes/search-form-section.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 148 => 48, 141 => 44, 133 => 39, 125 => 34, 117 => 29, 110 => 25, 105 => 23, 99 => 21, 94 => 18, 88 => 17, 82 => 14, 77 => 13, 74 => 12, 70 => 11, 63 => 7, 59 => 6, 55 => 5, 52 => 4, 50 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% from 'utils.html.twig' import ico %}
<form class=\"busca\" action=\"{{ path('productListSearch') }}\" method=\"GET\">
{% if not isDarkTheme and hasProducts and categories|length > 0 %}
<button type=\"button\" id=\"btn_categorias\" class=\"btn-categorias\">
<i class=\"ico\">{{ ico('apps') }}</i>
<span>{{ getLanguage('categories', 'search_form') }}</span>
<i class=\"ico\">{{ ico('chevron-down') }}</i>
</button>
<div class=\"box-categorias\">
<div>
{% for category in categories %}
{% if category.hasProduct() %}
<a href=\"{{ path('productListCategory', { type: 'produtos', slug: category.slug }) }}\">
{{ category.category }}
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
<input type=\"text\" id=\"search\" name=\"search\" placeholder=\"{{ getLanguage('course_to_study', 'search_form') }}\" autocomplete=\"off\">
<button type=\"submit\" class=\"btn-buscar\">
<i>{{ ico('search') }}</i>
</button>
<div id=\"search_suggestions\" class=\"search-suggestions\" data-status=\"start\" request=\"{{ path('productListSuggestionSearch') }}\">
<span class=\"item item-start\">
<i class=\"type-search\"></i>
<span>{{ getLanguage('course_to_study', 'search_form') }}</span>
</span>
<span class=\"item item-wait\">
<i class=\"type-search\"></i>
<span>{{ getLanguage('searching_for', 'search_form') }} <b class=\"js--search-term\">…</b></span>
</span>
<span class=\"item item-end-empty\">
<i class=\"type-search\"></i>
<span>{{ getLanguage('no_results_for', 'search_form') }} <b class=\"js--search-term\">…</b></span>
</span>
<a id=\"init_link\" class=\"item item-end-full\" href=\"\">
<i class=\"type-search\"></i>
<span>{{ getLanguage('see_all_courses_with', 'search_form') }} <b class=\"js--search-term\">…</b></span>
</a>
<div class=\"loader-container\">
<i class=\"loader\">{{ ico('loader-wish') }}</i>
</div>
<nav id=\"search_suggestions_links\" class=\"found-links\"></nav>
</div>
</form>", "website/includes/search-form-section.html.twig", "/var/www/html/templates/website/includes/search-form-section.html.twig");
}
}