<?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;
/* @BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig */
class __TwigTemplate_2c8184cdc3cf3641e0ef3d9a9e2073278224108887edfabcd84c2a12227c1eb0 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@SyliusShop/layout.html.twig";
}
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", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig"));
// line 3
$macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusUi/Macro/messages.html.twig", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig", 3)->unwrap();
// line 4
$macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusShop/Common/Macro/messages.html.twig", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig", 4)->unwrap();
// line 1
$this->parent = $this->loadTemplate("@SyliusShop/layout.html.twig", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 5
public function block_content($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(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 6
echo "<div class=\"content-client pt-0 page-faq-content\">
<div class=\"image-instit-top pt-0 object-fit-img\">
<img src=\"";
// line 8
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/bg_contact.jpg"), "html", null, true);
echo "\" alt=\"\"/>
</div>
<div class=\"max-container-3 px-2 px-xl-4\">
<div id=\"bitbag-faqs\" class=\" pt-md-5 pt-3 pb-md-5 pb-4 instit-page-top\">
<div class=\"text-center pt-md-4 pt-2\">
<h1 class=\"title-medium color-blue-s\">";
// line 14
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.footer.faq"), "html", null, true);
echo "</h1>
</div>
";
// line 17
if ((twig_length_filter($this->env, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 17, $this->source); })())) > 0)) {
// line 18
echo " <div class=\"\">
<div class=\"content-faq pt-md-5 pt-3\">
<div id=\"accordion\">
";
// line 21
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 21, $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["frequentlyAskedQuestion"]) {
// line 22
echo "
<div class=\"card rounded-0 border-0\" id=\"";
// line 23
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["frequentlyAskedQuestion"], "id", [], "any", false, false, false, 23), "html", null, true);
echo "\">
";
// line 24
$this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/Index/_show.html.twig", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig", 24)->display($context);
// line 25
echo " </div>
";
++$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['frequentlyAskedQuestion'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 27
echo " </div>
</div>
</div>
";
} else {
// line 31
echo " <div class=\"max-container-txt m-auto text-center\">
<div class=\"d-inline-block\">
<div class=\"py-4 py-md-5 text-center\">
";
// line 34
echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 34, $context, $this->getSourceContext());
echo "
</div>
</div>
</div>
";
}
// line 40
echo " </div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 45
public function block_javascripts($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(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 46
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script>
document.addEventListener(\"DOMContentLoaded\", function() {
let url = new URL(window.location.href);
let searchParam = url.searchParams;
if (searchParam.has('id')) {
let id = searchParam.get('id');
document.querySelectorAll('#bitbag-faqs .card').forEach(faq=>{
if (id === faq.id) {
faq.querySelector('div').classList.add('open');
faq.querySelector('div .collapse').style.display = \"block\";
}
})
}
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 184 => 46, 174 => 45, 161 => 40, 152 => 34, 147 => 31, 141 => 27, 126 => 25, 124 => 24, 120 => 23, 117 => 22, 100 => 21, 95 => 18, 93 => 17, 87 => 14, 78 => 8, 74 => 6, 64 => 5, 53 => 1, 51 => 4, 49 => 3, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@SyliusShop/layout.html.twig' %}
{% import '@SyliusUi/Macro/messages.html.twig' as messages %}
{% import '@SyliusShop/Common/Macro/messages.html.twig' as messages %}
{% block content %}
<div class=\"content-client pt-0 page-faq-content\">
<div class=\"image-instit-top pt-0 object-fit-img\">
<img src=\"{{ asset('images/bg_contact.jpg')}}\" alt=\"\"/>
</div>
<div class=\"max-container-3 px-2 px-xl-4\">
<div id=\"bitbag-faqs\" class=\" pt-md-5 pt-3 pb-md-5 pb-4 instit-page-top\">
<div class=\"text-center pt-md-4 pt-2\">
<h1 class=\"title-medium color-blue-s\">{{ 'app.footer.faq'|trans }}</h1>
</div>
{% if resources|length > 0 %}
<div class=\"\">
<div class=\"content-faq pt-md-5 pt-3\">
<div id=\"accordion\">
{% for frequentlyAskedQuestion in resources %}
<div class=\"card rounded-0 border-0\" id=\"{{frequentlyAskedQuestion.id}}\">
{% include '@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/Index/_show.html.twig' %}
</div>
{% endfor %}
</div>
</div>
</div>
{% else %}
<div class=\"max-container-txt m-auto text-center\">
<div class=\"d-inline-block\">
<div class=\"py-4 py-md-5 text-center\">
{{ messages.info('sylius.ui.no_results_to_display') }}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
document.addEventListener(\"DOMContentLoaded\", function() {
let url = new URL(window.location.href);
let searchParam = url.searchParams;
if (searchParam.has('id')) {
let id = searchParam.get('id');
document.querySelectorAll('#bitbag-faqs .card').forEach(faq=>{
if (id === faq.id) {
faq.querySelector('div').classList.add('open');
faq.querySelector('div .collapse').style.display = \"block\";
}
})
}
});
</script>
{% endblock %}", "@BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig", "/home/6nergiesboutique/www_preprod/themes/BootstrapTheme/templates/bundles/BitBagSyliusCmsPlugin/Shop/FrequentlyAskedQuestion/index.html.twig");
}
}