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

/* agenda2063/domaine_form.html.twig */
class __TwigTemplate_516b79a00a6891e4aebb55d4e47eb1cf 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'],
            'stylesheets' => [$this, 'block_stylesheets'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 11
        return $this->load(($context["extendedTemplate"] ?? null), 11);
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 1
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 1), "get", ["_application"], "method", false, false, false, 1) == 0)) {
            // line 2
            $context["extendedTemplate"] = "@AdminLTE/layout/mesodd-layout.html.twig";
        }
        // line 4
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 4), "get", ["_application"], "method", false, false, false, 4) == 1)) {
            // line 5
            $context["extendedTemplate"] = "@AdminLTE/layout/suiodd-layout.html.twig";
        }
        // line 7
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 7), "get", ["_application"], "method", false, false, false, 7) == 2)) {
            // line 8
            $context["extendedTemplate"] = "@AdminLTE/layout/cfgodd-layout.html.twig";
        }
        // line 11
        yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 13
    /**
     * @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("domaine.title", [], "messages");
        yield from [];
    }

    // line 15
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 16
        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 19
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 20
        yield "
    ";
        // line 21
        yield from $this->load("agenda2063/domaine_form.html.twig", 21, "1376525556")->unwrap()->yield($context);
        // line 34
        yield "
";
        yield from [];
    }

    // line 37
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 38
        yield "    <script>
        let \$code = \$('#indicator_code');
        let \$name = \$('#indicator_name');
        let \$goal = \$('#indicator_goal');

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

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

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

    <script src=\"";
        // line 64
        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();
});
</script>
";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  148 => 64,  120 => 38,  113 => 37,  107 => 34,  105 => 21,  102 => 20,  95 => 19,  87 => 16,  80 => 15,  69 => 13,  65 => 11,  62 => 8,  60 => 7,  57 => 5,  55 => 4,  52 => 2,  50 => 1,  43 => 11,);
    }

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


/* agenda2063/domaine_form.html.twig */
class __TwigTemplate_516b79a00a6891e4aebb55d4e47eb1cf___1376525556 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 21
        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", 21);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 22
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 23
        yield "            ";
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start');
        yield "
                ";
        // line 24
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
        yield "
                <div class=\"form-group row\">
                    <div class=\"col-sm-2\"><a href=\"";
        // line 26
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_domaines");
        yield "\" class=\"btn btn-block btn-default\">";
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.cancel", [], "messages");
        yield "</a></div>
                    <div class=\"col-sm-offset-2 col-sm-10\">
                        <button type=\"submit\" class=\"btn btn-block btn-primary\">";
        // line 28
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.save", [], "messages");
        yield "</button>
                    </div>
                </div>
            ";
        // line 31
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
        yield "
        ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  254 => 31,  248 => 28,  241 => 26,  236 => 24,  231 => 23,  224 => 22,  213 => 21,  148 => 64,  120 => 38,  113 => 37,  107 => 34,  105 => 21,  102 => 20,  95 => 19,  87 => 16,  80 => 15,  69 => 13,  65 => 11,  62 => 8,  60 => 7,  57 => 5,  55 => 4,  52 => 2,  50 => 1,  43 => 11,);
    }

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