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

/* communes/suivi.html.twig */
class __TwigTemplate_8d82360a331740ad90d59eb4d4c6903a 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 = [
            'page_title' => [$this, 'block_page_title'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
            'stylesheets' => [$this, 'block_stylesheets'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/layout/communeodd-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_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("suivi.indicateur.title", [], "messages");
        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield "     
        ";
        // line 7
        if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["indicators"] ?? null)) > 0)) {
            // line 8
            yield "            ";
            if ((($tmp = ($context["etat"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 9
                yield "                <div class=\"row\">
                    <div class=\"col-sm-12\">
                        <div class=\"text-right\">
                            <button type=\"button\" class=\"mb-2 mr-2 btn-shadow  btn btn-danger text-right ";
                // line 12
                yield (((($tmp = ($context["etat"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("") : ("disabled"));
                yield "\" data-toggle=\"modal\" data-target=\"#valideModal\">
                                <i class=\"fa fa-check\"></i> ";
                // line 13
                yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumettre") : ("Valider"));
                yield "
                            </button>
                        </div>
                    </div>
                </div>
            ";
            } else {
                // line 19
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 20
                    yield "                    ";
                    if ((($context["structureyear"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["structureyear"] ?? null), "focal2", [], "any", false, false, false, 20))) {
                        // line 21
                        yield "                        <div class=\"alert alert-success\">
                            Bravo!!!! Vous avez déjà soumis vos données. En cas de modification, veuillez contacter votre SE.
                        </div>
                    ";
                    } else {
                        // line 24
                        yield " 
                        <div class=\"alert alert-danger\">
                            Vous ne pouvez plus soumettre les données de votre commune. Veuillez le SE de votre commune.
                        </div>
                    ";
                    }
                    // line 29
                    yield "                ";
                }
                // line 30
                yield "                ";
                if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DPP")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 31
                    yield "                    ";
                    if ((($context["structureyear"] ?? null) && CoreExtension::getAttribute($this->env, $this->source, ($context["structureyear"] ?? null), "dpp2", [], "any", false, false, false, 31))) {
                        // line 32
                        yield "                        <div class=\"alert alert-success\">
                            Bravo!!!! Vous avez déjà validé vos données. En cas de modification, veuillez contacter la DGCS-ODD.
                        </div>
                    ";
                    } else {
                        // line 35
                        yield " 
                        <div class=\"alert alert-danger\">
                            Vous ne pouvez pas valider les données de votre commune. Soit le point focal ne les a pas encore soumis. Veuillez lui demander de soummettre les données. Soit vous avez dépassé le délai accordé par la DGCS-ODD et dans ce cas, veuillez contacter la DGCS-ODD.
                        </div>
                    ";
                    }
                    // line 40
                    yield "                ";
                }
                // line 41
                yield "            ";
            }
            // line 42
            yield "        ";
            yield from $this->load("communes/suivi.html.twig", 42, 1419771646)->unwrap()->yield($context);
            // line 89
            yield "  
        ";
        }
        // line 91
        yield "    
    ";
        // line 92
        if ((((Twig\Extension\CoreExtension::length($this->env->getCharset(), ($context["indicators"] ?? null)) == 0) && ($context["goal"] ?? null)) && ($context["entry"] ?? null))) {
            // line 93
            yield "    <div class=\"alert alert-primary alert-dismissible fade show\" role=\"alert\">
       Vous n'êtes en charge d'aucun indicateur. Veuillez contacter la DGCS-ODD.
    </div>
    ";
        }
        // line 97
        yield "
<!-- Valide Modal -->
        <div class=\"modal fade\" id=\"valideModal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myLargeModalLabel\" aria-hidden=\"true\">
            <div class=\"modal-dialog modal-lg\">
                <div class=\"modal-content\">
                    <div class=\"modal-header\">
                        <h5 class=\"modal-title h4\" id=\"myLargeModalLabel\">";
        // line 103
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumision") : ("Validation"));
        yield " des données de ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 103), "get", ["_year"], "method", false, false, false, 103), "html", null, true);
        yield "</h5>
                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                        <span aria-hidden=\"true\">&times;</span>
                        </button>
                    </div>
                    <form action=\"";
        // line 108
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_commune_validation");
        yield "\" method=\"post\" enctype=\"multipart/form-data\">
                    <div class=\"modal-body\">
                           Vous êtes sur le point de ";
        // line 110
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("soumettre") : ("valider"));
        yield " vos données. Vous ne pouvez plus les modifier.
                    </div>
                    <div class=\"modal-footer\">
                        <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Annuler</button>
                        <button type=\"submit\" class=\"btn btn-success\">";
        // line 114
        yield (((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_FOCAL")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("Soumettre") : ("Valider"));
        yield "</button>
                    </div>
                    </form>
                </div>
            </div>   
        </div>
";
        yield from [];
    }

    // line 122
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 123
        yield "    <script src=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/jquery.dataTables.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 124
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables-bs4/js/dataTables.bootstrap4.js"), "html", null, true);
        yield "\"></script>

";
        yield from [];
    }

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

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  231 => 129,  224 => 128,  216 => 124,  211 => 123,  204 => 122,  192 => 114,  185 => 110,  180 => 108,  170 => 103,  162 => 97,  156 => 93,  154 => 92,  151 => 91,  147 => 89,  144 => 42,  141 => 41,  138 => 40,  131 => 35,  125 => 32,  122 => 31,  119 => 30,  116 => 29,  109 => 24,  103 => 21,  100 => 20,  97 => 19,  88 => 13,  84 => 12,  79 => 9,  76 => 8,  74 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

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


/* communes/suivi.html.twig */
class __TwigTemplate_8d82360a331740ad90d59eb4d4c6903a___1419771646 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 = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 42
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 42);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 43
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 44
        yield "                <table id=\"suiviIndicateurTable\" class=\"table table-striped\">
                <thead>
                    <th>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">Cible</div>
                            <div class=\"col-3\">Indicateur</div>
                            <div class=\"col-6\">
                                ";
        // line 51
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(range(5, 0));
        foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
            // line 52
            yield "                                <div class=\"col-2 float-left text-center\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($context["year"] ?? null) - $context["i"]), "html", null, true);
            yield "</div>
                                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 54
        yield "                            </div>
                            
                            <div class=\"col-1 text-center\"></div>
                        </div>
                    </th>
                </thead>

                ";
        // line 61
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["indicators"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["indicator"]) {
            // line 62
            yield "                <tr>
                    <td>
                        <div class=\"row mt-2 mb-2\">
                            <div class=\"col-2\">";
            // line 65
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "target", [], "any", false, false, false, 65), "html", null, true);
            yield "</div>
                            <div class=\"col-3\">";
            // line 66
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["indicator"], "html", null, true);
            yield "</div>
                            <div class=\"col-6\">
                                ";
            // line 68
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(range(5, 0));
            foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                // line 69
                yield "                                <div class=\"col-2 float-left text-center\">";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v0 = (($_v1 = ($context["suivis"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 69)] ?? null) : null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0[(($context["year"] ?? null) - $context["i"])] ?? null) : null), "html", null, true);
                yield " ";
                yield ((((($_v2 = (($_v3 = ($context["suivis"] ?? null)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 69)] ?? null) : null)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2[(($context["year"] ?? null) - $context["i"])] ?? null) : null) == "-")) ? ("") : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "unity", [], "any", false, false, false, 69), "html", null, true)));
                yield "</div>
                                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_key'], $context['i'], $context['_parent']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 71
            yield "                                
                                <div class=\"col-12 float-left\">
                                    <hr>
                                        <i>";
            // line 74
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v4 = (($_v5 = ($context["suivis"] ?? null)) && is_array($_v5) || $_v5 instanceof ArrayAccess ? ($_v5[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 74)] ?? null) : null)) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4["observation"] ?? null) : null), "html", null, true);
            yield "</i>
                                    <br>
                                        <i><b>Source : ";
            // line 76
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((($_v6 = (($_v7 = ($context["suivis"] ?? null)) && is_array($_v7) || $_v7 instanceof ArrayAccess ? ($_v7[CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 76)] ?? null) : null)) && is_array($_v6) || $_v6 instanceof ArrayAccess ? ($_v6["source"] ?? null) : null), "html", null, true);
            yield "</i></b> 
                                </div>
                            </div>
                            
                            <div class=\"col-1 text-center\">
                                <a href=\"";
            // line 81
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_commune_indice_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["indicator"], "id", [], "any", false, false, false, 81)]), "html", null, true);
            yield "\" class=\"btn btn-sm btn-secondary\">";
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Modifier", [], "messages");
            yield "</a>
                            </div>
                        </div>
                    </td>
                </tr>
                ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['indicator'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 87
        yield "                </table>
            ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  406 => 87,  392 => 81,  384 => 76,  379 => 74,  374 => 71,  363 => 69,  359 => 68,  354 => 66,  350 => 65,  345 => 62,  341 => 61,  332 => 54,  323 => 52,  319 => 51,  310 => 44,  303 => 43,  292 => 42,  231 => 129,  224 => 128,  216 => 124,  211 => 123,  204 => 122,  192 => 114,  185 => 110,  180 => 108,  170 => 103,  162 => 97,  156 => 93,  154 => 92,  151 => 91,  147 => 89,  144 => 42,  141 => 41,  138 => 40,  131 => 35,  125 => 32,  122 => 31,  119 => 30,  116 => 29,  109 => 24,  103 => 21,  100 => 20,  97 => 19,  88 => 13,  84 => 12,  79 => 9,  76 => 8,  74 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

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