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

/* setting/ministry_list.html.twig */
class __TwigTemplate_5bb02ac56e015ebbd43446bdabaf4291 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/cfgodd-layout.html.twig";
    }

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

    // line 5
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 6
        yield "    ";
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 7
            yield "            <div class=\"text-right mb-3\">
                <a href=\"";
            // line 8
            yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_ministry_new");
            yield "\" class=\"btn btn-primary text-right\">
                    <i class=\"fa fa-plus\"></i> ";
            // line 9
            yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("ministry.add", [], "messages");
            // line 10
            yield "                </a>
            </div>
    ";
        }
        // line 13
        yield "    
    
    ";
        // line 15
        yield from $this->load("setting/ministry_list.html.twig", 15, 1264331399)->unwrap()->yield($context);
        // line 74
        yield "
";
        yield from [];
    }

    // line 77
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 78
        yield "    <script src=\"";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/French.json"), "html", null, true);
        yield "\"></script>
    <script>
        \$(function () {
            \$(\"#ministryTable\").DataTable({
                \"pageLength\": 25,
                \"language\": {
                    \"url\": \"";
        // line 84
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/datatables/French.json"), "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/jquery.dataTables.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 91
        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 94
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 95
        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 "setting/ministry_list.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  145 => 95,  138 => 94,  131 => 91,  127 => 90,  118 => 84,  108 => 78,  101 => 77,  95 => 74,  93 => 15,  89 => 13,  84 => 10,  82 => 9,  78 => 8,  75 => 7,  72 => 6,  65 => 5,  54 => 3,  43 => 1,);
    }

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


/* setting/ministry_list.html.twig */
class __TwigTemplate_5bb02ac56e015ebbd43446bdabaf4291___1264331399 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 15
        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", 15);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 16
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 17
        yield "            <table id=\"ministryTable\" class=\"table table-striped\">
            <thead>
                <th>";
        // line 19
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.code", [], "messages");
        yield "</th>
                <th>";
        // line 20
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.name", [], "messages");
        yield "</th>
                <th>";
        // line 21
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.year", [], "messages");
        yield "</th>
                ";
        // line 22
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 23
            yield "                    <th style=\"width: 100px\"></th>
                ";
        }
        // line 25
        yield "            </thead>
            <tbody>
            ";
        // line 27
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["ministries"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["ministry"]) {
            // line 28
            yield "                <tr>
                    <td>";
            // line 29
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "code", [], "any", false, false, false, 29), "html", null, true);
            yield "</td>
                    <td>";
            // line 30
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "name", [], "any", false, false, false, 30), "html", null, true);
            yield "</td>
                    <td>";
            // line 31
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(max(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "years", [], "any", false, false, false, 31)), "html", null, true);
            yield "</td>
                    ";
            // line 32
            if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                // line 33
                yield "                        <td class=\"text-center\">
                            <div class=\"btn-group\">
                                <a href=\"";
                // line 35
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_ministry", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "id", [], "any", false, false, false, 35)]), "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>
                                <button type=\"button\" class=\"btn btn-sm btn-default dropdown-toggle\" data-toggle=\"dropdown\">
                                    <span class=\"caret\"></span>
                                    <span class=\"sr-only\">Toggle Dropdown</span>
                                </button>
                                <div class=\"dropdown-menu\" role=\"menu\">
                                    <a class=\"dropdown-item\" href=\"#\" data-toggle=\"modal\" data-target=\"#modal-delete-";
                // line 41
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "id", [], "any", false, false, false, 41), "html", null, true);
                yield "\">";
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.delete", [], "messages");
                yield "</a>
                                </div>
    
                                <div class=\"modal fade\" id=\"modal-delete-";
                // line 44
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "id", [], "any", false, false, false, 44), "html", null, true);
                yield "\">
                                    <div class=\"modal-dialog\">
                                        <div class=\"modal-content\">
                                            <div class=\"modal-header\">
                                                <h5 class=\"modal-title\">";
                // line 48
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.delete.title", [], "messages");
                yield "</h5>
                                                <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
                                                    <span aria-hidden=\"true\">&times;</span>
                                                </button>
                                            </div>
                                            <div class=\"modal-body\">
                                                <p>";
                // line 54
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("ministry.delete.message", [], "messages");
                yield "</p>
                                                <b>";
                // line 55
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "code", [], "any", false, false, false, 55), "html", null, true);
                yield "<br>";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "name", [], "any", false, false, false, 55), "html", null, true);
                yield "</b>
                                            </div>
                                            <div class=\"modal-footer justify-content-between\">
                                                <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">";
                // line 58
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.no", [], "messages");
                yield "</button>
                                                <a href=\"";
                // line 59
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_ministry_delete", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["ministry"], "id", [], "any", false, false, false, 59)]), "html", null, true);
                yield "\" class=\"btn btn-danger\">";
                yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("basics.yes", [], "messages");
                yield "</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
    
                                </div>
                        </td>
                    ";
            }
            // line 68
            yield "                </tr>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['ministry'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 70
        yield "            </tbody>
            </table>
        ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  347 => 70,  340 => 68,  326 => 59,  322 => 58,  314 => 55,  310 => 54,  301 => 48,  294 => 44,  286 => 41,  275 => 35,  271 => 33,  269 => 32,  265 => 31,  261 => 30,  257 => 29,  254 => 28,  250 => 27,  246 => 25,  242 => 23,  240 => 22,  236 => 21,  232 => 20,  228 => 19,  224 => 17,  217 => 16,  206 => 15,  145 => 95,  138 => 94,  131 => 91,  127 => 90,  118 => 84,  108 => 78,  101 => 77,  95 => 74,  93 => 15,  89 => 13,  84 => 10,  82 => 9,  78 => 8,  75 => 7,  72 => 6,  65 => 5,  54 => 3,  43 => 1,);
    }

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