<?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/sensibilite.html.twig */
class __TwigTemplate_b48a1da6e87f90662a9d20e9f9f50d3f 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 = [
            '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;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/sensibilite.html.twig"));

        $this->parent = $this->load("frontend/layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));

        // line 4
        yield "<div class=\"container single-template\">
    <div class=\"page-header\">
\t\t<h1 class=\"page-title\">
\t\t\tSensibilité des PTA aux ODD en ";
        // line 7
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["year"]) || array_key_exists("year", $context) ? $context["year"] : (function () { throw new RuntimeError('Variable "year" does not exist.', 7, $this->source); })()), "html", null, true);
        yield "
\t\t</h1>
\t</div>

    <div class=\"container row\" style=\"margin-top: 20px;\">
\t\t<p>
\t\t\tLa Mesure Sensibilité ODD est une tâche de la DGCS-ODD pour évaluer, de manière proactive, la conformité des Plans de Travail Annuel (PTA) des ministères et des communes avec les Objectifs de Développement Durable (ODD). Elle permet une analyse ex ante, c'est-à-dire en amont de la mise en œuvre, afin d'identifier dans quelle mesure les actions planifiées contribuent aux différentes cibles des ODD. En fournissant des indicateurs clairs et des outils d'évaluation pertinents, cette application aide les ministères à aligner leurs stratégies et leurs priorités avec l'Agenda 2030 pour un développement durable, tout en renforçant la cohérence des politiques publiques.
\t\t</p>

\t\t";
        // line 16
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 16, $this->source); })()), 'form_start');
        yield "
\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            ";
        // line 19
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 19, $this->source); })()), "year", [], "any", false, false, false, 19), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
        yield "
                            ";
        // line 20
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 20, $this->source); })()), "year", [], "any", false, false, false, 20), 'widget');
        yield "
                        </div>
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            ";
        // line 23
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 23, $this->source); })()), "type", [], "any", false, false, false, 23), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
        yield "
                            ";
        // line 24
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 24, $this->source); })()), "type", [], "any", false, false, false, 24), 'widget');
        yield "
                        </div>
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            ";
        // line 27
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 27, $this->source); })()), "entite", [], "any", false, false, false, 27), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
        yield "
                            ";
        // line 28
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 28, $this->source); })()), "entite", [], "any", false, false, false, 28), 'widget');
        yield "
                        </div>
\t\t\t\t\t</div>
\t\t\t\t";
        // line 31
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 31, $this->source); })()), 'form_end');
        yield "  

\t\t\t\t<div class=\"row\" style=\"margin-top: 50px;\">
                <div class=\"col-md-12\">
                    <div class=\"chart\" style=\"position: relative; height:80vh; width:100%\">
                        <canvas id=\"barChart\"></canvas>
                        <div id=\"bar-chart\" style=\"height: 500px;\"></div>
                    </div>
                </div>
            </div>

\t</div>

</div>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 47
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_js(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "js"));

        // line 48
        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>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>

\t<script>
        \$(function () {
            var barChartData = {
                labels  : ";
        // line 74
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 74, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 74, $this->source); })()), "labels", [], "array", false, false, false, 74));
        } else {
            yield " [] ";
        }
        yield ",
                datasets: [
                    {
                        backgroundColor     : ";
        // line 77
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 77, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 77, $this->source); })()), "bgColor", [], "array", false, false, false, 77));
        } else {
            yield " [] ";
        }
        yield ",
                        borderColor         : ";
        // line 78
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 78, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 78, $this->source); })()), "bgColor", [], "array", false, false, false, 78));
        } else {
            yield " [] ";
        }
        yield ",
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 85
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 85, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 85, $this->source); })()), "values", [], "array", false, false, false, 85));
        } else {
            yield " [] ";
        }
        // line 86
        yield "                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        backgroundColor: ";
        // line 109
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 109, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 109, $this->source); })()), "bgColor", [], "array", false, false, false, 109));
        } else {
            yield " [] ";
        }
        yield ",
\t\t\t\t\t\tborderColor: 'white',
\t\t\t\t\t\tborderRadius: 25,
\t\t\t\t\t\tborderWidth: 2,
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"";
        // line 133
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chart.js/Chart.min.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 134
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js"), "html", null, true);
        yield "\"></script>

";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  282 => 134,  278 => 133,  247 => 109,  222 => 86,  216 => 85,  202 => 78,  194 => 77,  184 => 74,  154 => 48,  144 => 47,  121 => 31,  115 => 28,  111 => 27,  105 => 24,  101 => 23,  95 => 20,  91 => 19,  85 => 16,  73 => 7,  68 => 4,  58 => 3,  41 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends 'frontend/layout.html.twig' %}

{% block content %}
<div class=\"container single-template\">
    <div class=\"page-header\">
\t\t<h1 class=\"page-title\">
\t\t\tSensibilité des PTA aux ODD en {{ year }}
\t\t</h1>
\t</div>

    <div class=\"container row\" style=\"margin-top: 20px;\">
\t\t<p>
\t\t\tLa Mesure Sensibilité ODD est une tâche de la DGCS-ODD pour évaluer, de manière proactive, la conformité des Plans de Travail Annuel (PTA) des ministères et des communes avec les Objectifs de Développement Durable (ODD). Elle permet une analyse ex ante, c'est-à-dire en amont de la mise en œuvre, afin d'identifier dans quelle mesure les actions planifiées contribuent aux différentes cibles des ODD. En fournissant des indicateurs clairs et des outils d'évaluation pertinents, cette application aide les ministères à aligner leurs stratégies et leurs priorités avec l'Agenda 2030 pour un développement durable, tout en renforçant la cohérence des politiques publiques.
\t\t</p>

\t\t{{ form_start(form) }}
\t\t\t\t\t<div class=\"form-group row\">
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            {{ form_label(form.year, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.year) }}
                        </div>
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.type) }}
                        </div>
\t\t\t\t\t\t<div class=\"col-sm-4\">
                            {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.entite) }}
                        </div>
\t\t\t\t\t</div>
\t\t\t\t{{ form_end(form) }}  

\t\t\t\t<div class=\"row\" style=\"margin-top: 50px;\">
                <div class=\"col-md-12\">
                    <div class=\"chart\" style=\"position: relative; height:80vh; width:100%\">
                        <canvas id=\"barChart\"></canvas>
                        <div id=\"bar-chart\" style=\"height: 500px;\"></div>
                    </div>
                </div>
            </div>

\t</div>

</div>
{% endblock %}

{% block js %}
<script src=\"{{ asset('plugins/jquery/jquery.min.js') }}\"></script>
<script>
        let \$type = \$('#ministry_commune_sel_type');

        \$type.change(function() {
            let \$form = \$type.closest('form');

            let data = {};
            data[\$type.attr('name')] = \$type.val();

            \$.ajax({
                url: \$form.attr('action'),
                type: \$form.attr('method'),
                data: data,
                success: function(html) {
                    \$('#ministry_commune_sel_entite').replaceWith(
                        \$(html).find('#ministry_commune_sel_entite')
                    );
                }
            });
        });
    </script>

\t<script>
        \$(function () {
            var barChartData = {
                labels  : {% if barChart %}{{ barChart['labels']|json_encode()|raw }}{% else %} [] {% endif %},
                datasets: [
                    {
                        backgroundColor     : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderColor         : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {% if barChart %}{{ barChart['values']|json_encode()|raw }}{% else %} [] {% endif %}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        backgroundColor: {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
\t\t\t\t\t\tborderColor: 'white',
\t\t\t\t\t\tborderRadius: 25,
\t\t\t\t\t\tborderWidth: 2,
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>

{% endblock %}", "frontend/sensibilite.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/frontend/sensibilite.html.twig");
    }
}
