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

/* suivi_ind/calcul_form.html.twig */
class __TwigTemplate_e1b09886e719a8334b3faafafe1a311b 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/suiodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/layout/suiodd-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("indice.title", [], "messages");
        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 7
        yield "    ";
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start');
        yield "
  
        ";
        // line 9
        yield from $this->load("suivi_ind/calcul_form.html.twig", 9, 449174435)->unwrap()->yield($context);
        // line 14
        yield "     
        ";
        // line 15
        if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "indiceModels", [], "any", false, false, false, 15)) > 0)) {
            // line 16
            yield "        ";
            yield from $this->load("suivi_ind/calcul_form.html.twig", 16, 2038089307)->unwrap()->yield($context);
            // line 49
            yield "        ";
        }
        // line 50
        yield "              
    ";
        // line 51
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
        yield "
";
        yield from [];
    }

    // line 55
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 56
        yield "    <script>
 

        /*window.onload = function(){
            \$(\"#notationTable tr.notation\").each(function() {
                let row = this.id
                \$('#'+row+'_locationType').val('department');
                locationTypeChange(row)
                calculTargetRate(row)
                calculLocationRate(row)
            });
        };*/

        function calculIndice(row) {

            let minValue = \$('#'+row+'_minValue').val()
            let maxValue = \$('#'+row+'_maxValue').val()
            let value = \$('#'+row+'_value').val()
                
            indice = (value - minValue) / (maxValue - minValue)
            \$('#'+row+'_indice').val(indice)
            \$('#'+row+'_indiceHtml').val(indice)
        }
    </script>

    <script>
        \$(function () {
            \$(\"#indiceTable\").DataTable({
                \"pageLength\": 25
            });
        });
    </script>

    <script src=\"";
        // line 89
        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 90
        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 93
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 94
        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 "suivi_ind/calcul_form.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  161 => 94,  154 => 93,  147 => 90,  143 => 89,  108 => 56,  101 => 55,  94 => 51,  91 => 50,  88 => 49,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

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


/* suivi_ind/calcul_form.html.twig */
class __TwigTemplate_e1b09886e719a8334b3faafafe1a311b___449174435 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 9
        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", 9);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 10
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 11
        yield "                ";
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "goal", [], "any", false, false, false, 11), 'row');
        yield "
            ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  240 => 11,  233 => 10,  222 => 9,  161 => 94,  154 => 93,  147 => 90,  143 => 89,  108 => 56,  101 => 55,  94 => 51,  91 => 50,  88 => 49,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

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


/* suivi_ind/calcul_form.html.twig */
class __TwigTemplate_e1b09886e719a8334b3faafafe1a311b___2038089307 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 16
        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", 16);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 17
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 18
        yield "                ";
        // line 19
        $this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme(CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "indiceModels", [], "any", false, false, false, 19), ["form/indice.html.twig"], true);
        // line 22
        yield "
                ";
        // line 23
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'errors');
        yield "

                <table id=\"indiceTable\" class=\"table table-striped indice-collection\">
                <thead>
                    <th class=\"row\">
                        <div class=\"col-2 text-center\">Cible</div>
                        <div class=\"col-3 text-center\">Indicateur</div>
                        <div class=\"col-6 text-center\">
                            <div class=\"col-4 text-center float-left\">Valeur</div>
                            <div class=\"col-4 text-center float-left\">Val cible</div>
                            <div class=\"col-4 text-center float-left\">Unité</div>
                        </div>
                        <div class=\"col-1 text-center\"></div>
                    </th>
                </thead>
                <tbody>
                    ";
        // line 39
        $context["index"] = 0;
        // line 40
        yield "                    ";
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "indiceModels", [], "any", false, false, false, 40));
        foreach ($context['_seq'] as $context["_key"] => $context["indice"]) {
            // line 41
            yield "                        ";
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock($context["indice"], 'row', ["indicator" => (($_v0 = ($context["indicators"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0[($context["index"] ?? null)] ?? null) : null)]);
            yield "
                        ";
            // line 42
            $context["index"] = (($context["index"] ?? null) + 1);
            // line 43
            yield "                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['indice'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 44
        yield "                </tbody>
                </table>

            ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  365 => 44,  359 => 43,  357 => 42,  352 => 41,  347 => 40,  345 => 39,  326 => 23,  323 => 22,  321 => 19,  319 => 18,  312 => 17,  301 => 16,  240 => 11,  233 => 10,  222 => 9,  161 => 94,  154 => 93,  147 => 90,  143 => 89,  108 => 56,  101 => 55,  94 => 51,  91 => 50,  88 => 49,  85 => 16,  83 => 15,  80 => 14,  78 => 9,  72 => 7,  65 => 6,  54 => 3,  43 => 1,);
    }

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