<?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;

/* frontend/communes.html.twig */
class __TwigTemplate_026414eb0b1c5e074e692f9353df7410 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->blocks = [
            'css' => [$this, 'block_css'],
            'content' => [$this, 'block_content'],
            'js' => [$this, 'block_js'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "frontend/layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("frontend/layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_css(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 4
        yield "    <link href=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/css/select2.min.css"), "html", null, true);
        yield "\" rel=\"stylesheet\">
";
        yield from [];
    }

    // line 7
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 8
        yield "    <div class=\"container row\" style=\"max-width: 100%;\">

        <div class=\"col-lg-4 entries\" style=\"height:540px;overflow-y: scroll;\">
            <br>
            <div class=\"template-details\">
                <h2>Indicateurs renseignables par les communes</h2>
                <ul style=\"list-style-type: none;\">
\t\t\t\t\t";
        // line 15
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["indicators"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["indicateur"]) {
            // line 16
            yield "\t\t\t\t\t\t<li style=\"padding: 3px 0 2px 0;\">
                            <font size=\"-1\">
\t\t\t\t\t\t\t<a href=\"\" style=\"pointer-events: none; cursor: default;\">
\t\t\t\t\t\t\t\t<svg class=\"icon icon-chevron-right\" fill=\"currentColor\">
\t\t\t\t\t\t\t\t\t<use xlink:href=\"";
            // line 20
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("frontend/icons/icons-3.7.svg"), "html", null, true);
            yield "#chevron-right\"></use>
\t\t\t\t\t\t\t\t</svg>
\t\t\t\t\t\t\t\t";
            // line 22
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicateur"], "code", [], "any", false, false, false, 22), "html", null, true);
            yield "
\t\t\t\t\t\t\t\t-
\t\t\t\t\t\t\t\t";
            // line 24
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicateur"], "name", [], "any", false, false, false, 24), "html", null, true);
            yield "
\t\t\t\t\t\t\t</a>
                            </font>
\t\t\t\t\t\t</li>
\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['indicateur'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 29
        yield "\t\t\t\t</ul>
\t\t\t\t
\t\t\t</div>
\t\t</div>

        <div class=\"col-lg-3\">
\t\t\t<div class=\"single-sidebar\">

\t\t\t\t<svg version=\"1.1\" id=\"Benin\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"  height=\"500px\" viewbox=\"0 0 432 755\" style=\"enable-background:new 0 0 432 755;\" xml:space=\"preserve\">
\t\t\t\t\t\t<defs>
\t\t\t\t\t\t\t<style>
\t\t\t\t\t\t\t\t#carte path {
\t\t\t\t\t\t\t\t\tcursor: pointer;
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\tpath:hover {
\t\t\t\t\t\t\t\t\topacity: .5;
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t</style>
\t\t\t\t\t\t</defs>
\t\t\t\t\t\t";
        // line 48
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["departements"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["departement"]) {
            // line 49
            yield "\t\t\t\t\t\t<a onclick=\"chargerCommune2(";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["departement"], "id", [], "any", false, false, false, 49), "html", null, true);
            yield ")\" class=\"tooltips\" data-container=\"body\" data-original-title=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["departement"], "name", [], "any", false, false, false, 49), "html", null, true);
            yield "\">
\t\t\t\t\t\t\t<path
\t\t\t\t\t\t\t\tid=\"departement";
            // line 51
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["departement"], "id", [], "any", false, false, false, 51), "html", null, true);
            yield "\" style=\"fill-rule:evenodd;clip-rule:evenodd;fill:#dff1fd;stroke:#000;stroke-width:1;stroke-miterlimit:10;\" d=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["departement"], "coordonnee", [], "any", false, false, false, 51), "html", null, true);
            yield "\"><title>";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["departement"], "name", [], "any", false, false, false, 51), "html", null, true);
            yield "</title>
\t\t\t\t\t\t\t</path>
\t\t\t\t\t\t</a>
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['departement'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 55
        yield "\t\t\t\t\t</svg>
\t\t\t</div>
\t\t</div>

\t\t<div class=\"col-lg-5\">
            <div class=\"download-template\">

\t\t\t\t<div class=\"licenses\">
\t\t\t\t\t<div class=\"title\" style=\"height: auto;\">
\t\t\t\t\t\tPour voir les cibles spatialisées par une commune ainsi que ces indicateurs, veuillez sélectionner un département puis la commune
\t\t\t\t\t</div>
\t\t\t\t</div>
\t\t\t</div>

            <div id=\"communes\">
                
            </div>
\t\t\t
\t\t</div>
\t\t
\t</div>
";
        yield from [];
    }

    // line 78
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_js(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 79
        yield "    <script src=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/jquery/jquery.min.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 80
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/select2.min.js"), "html", null, true);
        yield "\"></script>
<script>
\$(document).ready(function() {
    \$('.select2').select2();
});

function changeODD(val){
    let route =  \"";
        // line 87
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("indicateur", ["id" => "odd_"]), "js"), "html", null, true);
        yield "\";
    route = route.replace('odd_', val.value);
    window.location = route;
}

function commune(id){
    let route =  \"";
        // line 93
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("commune", ["id" => "commune_"]), "js"), "html", null, true);
        yield "\";
    route = route.replace('commune_', id);
    window.location = route;
}
</script>

<script>
    function chargerCommune2(departement){
        let route =  \"";
        // line 101
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("chargerCommunes2", ["id" => "departement_"]), "js"), "html", null, true);
        yield "\";
        route = route.replace('departement_', departement);

        \$.ajax({
                url: route,
                data: null,
                type: 'GET',
                success: function(data) {
                    \$('#communes').html(data);
                }
            });
    }
</script>
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "frontend/communes.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  230 => 101,  219 => 93,  210 => 87,  200 => 80,  195 => 79,  188 => 78,  162 => 55,  148 => 51,  140 => 49,  136 => 48,  115 => 29,  104 => 24,  99 => 22,  94 => 20,  88 => 16,  84 => 15,  75 => 8,  68 => 7,  60 => 4,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "frontend/communes.html.twig", "/var/www/html/templates/frontend/communes.html.twig");
    }
}
