<?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/target.html.twig */
class __TwigTemplate_f8c745c2a140dea56b2ba75da36143a1 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 7
        return $this->load(($context["extendedTemplate"] ?? null), 7);
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 1
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 2
            $context["extendedTemplate"] = "@AdminLTE/layout/ddd-layout.html.twig";
        } else {
            // line 4
            $context["extendedTemplate"] = "@AdminLTE/layout/communeodd-layout.html.twig";
        }
        // line 7
        yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 9
    /**
     * @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("Liste des cibles", [], "messages");
        yield from [];
    }

    // line 12
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 13
        yield "    ";
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 14
            yield "        ";
            yield from $this->load("communes/target.html.twig", 14, 1784791896)->unwrap()->yield($context);
            // line 23
            yield "    ";
        }
        // line 24
        yield "
    ";
        // line 25
        yield from $this->load("communes/target.html.twig", 25, 1453053230)->unwrap()->yield($context);
        yield from [];
    }

    // line 58
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 59
        yield "    <script>
        \$(function () {
            \$(\"#targetTable\").DataTable({
                \"pageLength\": 25
            });
        });
    </script>

    <script src=\"";
        // line 67
        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 68
        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 71
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 72
        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/target.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  132 => 72,  125 => 71,  118 => 68,  114 => 67,  104 => 59,  97 => 58,  92 => 25,  89 => 24,  86 => 23,  83 => 14,  80 => 13,  73 => 12,  62 => 9,  58 => 7,  55 => 4,  52 => 2,  50 => 1,  43 => 7,);
    }

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


/* communes/target.html.twig */
class __TwigTemplate_f8c745c2a140dea56b2ba75da36143a1___1784791896 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 14
        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", 14);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 15
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 16
        yield "            <div class=\"text-right\">
                <a href=\"";
        // line 17
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_target_new");
        yield "\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> ";
        // line 18
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("target.add", [], "messages");
        // line 19
        yield "                </a>
            </div>
            ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  220 => 19,  218 => 18,  214 => 17,  211 => 16,  204 => 15,  193 => 14,  132 => 72,  125 => 71,  118 => 68,  114 => 67,  104 => 59,  97 => 58,  92 => 25,  89 => 24,  86 => 23,  83 => 14,  80 => 13,  73 => 12,  62 => 9,  58 => 7,  55 => 4,  52 => 2,  50 => 1,  43 => 7,);
    }

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


/* communes/target.html.twig */
class __TwigTemplate_f8c745c2a140dea56b2ba75da36143a1___1453053230 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 25
        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", 25);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 26
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 27
        yield "            <table id=\"targetTable\" class=\"table table-striped\">
            <thead>
                <th>";
        // line 29
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                <th>";
        // line 30
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                <th>";
        // line 31
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("target.goal", [], "messages");
        yield "</th>
                ";
        // line 32
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 33
            yield "                    <th style=\"width: 100px\"></th>
                ";
        }
        // line 35
        yield "            </thead>
            <tbody>
            ";
        // line 37
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["targets"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["target"]) {
            // line 38
            yield "                <tr>
                    <td>";
            // line 39
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["target"], "code", [], "any", false, false, false, 39), "html", null, true);
            yield "</td>
                    <td>";
            // line 40
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["target"], "name", [], "any", false, false, false, 40), "html", null, true);
            yield "</td>
                    <td>";
            // line 41
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["target"], "goal", [], "any", false, false, false, 41), "name", [], "any", false, false, false, 41), "html", null, true);
            yield "</td>
                    ";
            // line 42
            if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 43
                yield "                    <td class=\"text-center\">
                        <div class=\"btn-group\">
                            <a href=\"";
                // line 45
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_target", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["target"], "id", [], "any", false, false, false, 45)]), "html", null, true);
                yield "\" class=\"btn btn-sm btn-default\" role=\"button\" aria-pressed=\"true\">";
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.update", [], "messages");
                yield "</a>
                        </div>
                    </td>
                    ";
            }
            // line 49
            yield "                </tr>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['target'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 51
        yield "            </tbody>
            </table>
        ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  365 => 51,  358 => 49,  349 => 45,  345 => 43,  343 => 42,  339 => 41,  335 => 40,  331 => 39,  328 => 38,  324 => 37,  320 => 35,  316 => 33,  314 => 32,  310 => 31,  306 => 30,  302 => 29,  298 => 27,  291 => 26,  280 => 25,  220 => 19,  218 => 18,  214 => 17,  211 => 16,  204 => 15,  193 => 14,  132 => 72,  125 => 71,  118 => 68,  114 => 67,  104 => 59,  97 => 58,  92 => 25,  89 => 24,  86 => 23,  83 => 14,  80 => 13,  73 => 12,  62 => 9,  58 => 7,  55 => 4,  52 => 2,  50 => 1,  43 => 7,);
    }

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