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

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

    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
            if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, true, false, 5), "get", ["_commune"], "method", true, true, false, 5)) {
                // line 6
                $context["extendedTemplate"] = "@AdminLTE/layout/communeodd-layout.html.twig";
            } else {
                // line 8
                $context["extendedTemplate"] = "@AdminLTE/layout/suiodd-layout.html.twig";
            }
        }
        // line 11
        if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 11), "get", ["_application"], "method", false, false, false, 11) == 2)) {
            // line 12
            $context["extendedTemplate"] = "@AdminLTE/layout/cfgodd-layout.html.twig";
        }
        // line 15
        yield from $this->getParent($context)->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 17
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 18
        yield "\t";
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("message.title", [], "messages");
        yield from [];
    }

    // line 20
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 21
        yield "<div class=\"row\">
\t<div class=\"col-md-3\">
\t\t<a href=\"";
        // line 23
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("message.write");
        yield "\" class=\"btn btn-primary btn-block mb-3\">Nouveau</a>
\t\t<div class=\"card\">
\t<div class=\"card-header\">
\t\t<h3 class=\"card-title\">Dossiers</h3>
\t</div>
\t<div class=\"card-body p-0\">
\t\t<ul class=\"nav nav-pills flex-column\">
\t\t\t<li class=\"nav-item\">
\t\t\t\t<a href=\"";
        // line 31
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("messages");
        yield "\" class=\"nav-link\">
\t\t\t\t\t<i class=\"fas fa-inbox\"></i>
\t\t\t\t\t";
        // line 33
        yield (((($context["etat"] ?? null) == "sent")) ? ("") : ("<b>"));
        yield " Boîte de réception";
        yield (((($context["etat"] ?? null) == "sent")) ? ("") : ("</b>"));
        yield "
\t\t\t\t\t<span class=\"badge bg-primary float-right\">";
        // line 34
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["nonlus"] ?? null), "html", null, true);
        yield "</span>
\t\t\t\t</a>
\t\t\t</li>
\t\t\t<li class=\"nav-item\">
\t\t\t\t<a href=\"";
        // line 38
        yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("messages_envoyes");
        yield "\" class=\"nav-link\">
\t\t\t\t\t<i class=\"far fa-envelope\"></i>
\t\t\t\t\t";
        // line 40
        yield (((($context["etat"] ?? null) == "sent")) ? ("<b>") : (""));
        yield " Elements envoyés ";
        yield (((($context["etat"] ?? null) == "sent")) ? ("</b>") : (""));
        yield "
\t\t\t\t</a>
\t\t\t</li>
\t\t</ul>
\t</div>
\t<!-- /.card-body -->
</div>
\t</div>
\t<!-- /.col -->
\t<div class=\"col-md-9\">
\t\t<div class=\"card card-primary card-outline\">
\t\t\t<div class=\"card-header\">
\t\t\t\t<h3 class=\"card-title\">Boîte de réception</h3>
\t\t\t\t<!-- /.card-tools -->
\t\t\t</div>
\t\t\t<!-- /.card-header -->
\t\t\t<div class=\"card-body p-0\">
\t\t\t\t<div class=\"\" style=\"margin:20px 10px 20px 10px;\">
\t\t\t\t\t<table id=\"goalTable\" class=\"table table-striped\" >
\t\t\t\t\t\t<thead style=\"display:none;\">
\t\t\t\t\t\t\t<th></th>
\t\t\t\t\t\t\t<th></th>
\t\t\t\t\t\t\t<th></th>
\t\t\t\t\t\t</thead>
\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t";
        // line 65
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["messages"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
            // line 66
            yield "\t\t\t\t\t\t\t<tr onclick=\"document.location='";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("message", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["message"], "id", [], "any", false, false, false, 66), "etat" => ($context["etat"] ?? null)]), "html", null, true);
            yield "'\" style=\"cursor:pointer;\">
\t\t\t\t\t\t\t<a href=\"read-mail.html\">
\t\t\t\t\t\t\t\t<";
            // line 68
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 68) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield " class=\"mailbox-name\">
\t\t\t\t\t\t\t\t\t";
            // line 69
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["message"], "sender", [], "any", false, false, false, 69), "familyName", [], "any", false, false, false, 69), "html", null, true);
            yield " ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["message"], "sender", [], "any", false, false, false, 69), "givenName", [], "any", false, false, false, 69), "html", null, true);
            yield "
\t\t\t\t\t\t\t\t</";
            // line 70
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 70) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield ">
\t\t\t\t\t\t\t\t<";
            // line 71
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 71) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield " class=\"mailbox-subject\">
\t\t\t\t\t\t\t\t\t";
            // line 72
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "title", [], "any", false, false, false, 72), "html", null, true);
            yield "
\t\t\t\t\t\t\t\t</";
            // line 73
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 73) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield ">
\t\t\t\t\t\t\t\t<";
            // line 74
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 74) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield " class=\"mailbox-date\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["message"], "createAt", [], "any", false, false, false, 74), "d.m.Y H:i"), "html", null, true);
            yield "</";
            yield (((CoreExtension::getAttribute($this->env, $this->source, $context["message"], "lu", [], "any", false, false, false, 74) || (($context["etat"] ?? null) == "sent"))) ? ("td") : ("th"));
            yield ">
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 78
        yield "\t\t\t\t\t\t</tbody>
\t\t\t\t\t</table>
\t\t\t\t\t<!-- /.table -->
\t\t\t\t</div>
\t\t\t\t<!-- /.mail-box-messages -->
\t\t\t</div>
\t\t\t<!-- /.card-body -->
\t\t</div>
\t\t<!-- /.card -->
\t</div>
\t<!-- /.col -->
</div>
";
        yield from [];
    }

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

    <script src=\"";
        // line 102
        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 103
        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 106
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_stylesheets(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 107
        yield "\t<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 "messages/index.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  266 => 107,  259 => 106,  252 => 103,  248 => 102,  237 => 93,  230 => 92,  213 => 78,  199 => 74,  195 => 73,  191 => 72,  187 => 71,  183 => 70,  177 => 69,  173 => 68,  167 => 66,  163 => 65,  133 => 40,  128 => 38,  121 => 34,  115 => 33,  110 => 31,  99 => 23,  95 => 21,  88 => 20,  82 => 18,  75 => 17,  71 => 15,  68 => 12,  66 => 11,  62 => 8,  59 => 6,  57 => 5,  55 => 4,  52 => 2,  50 => 1,  43 => 15,);
    }

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