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

/* base/liste-batterie.html.twig */
class __TwigTemplate_4c567bf8ff185190cf6dcaa48df4a4ee 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 = [
            'title' => [$this, 'block_title'],
            'body' => [$this, 'block_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "base.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", "base/liste-batterie.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "base/liste-batterie.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 2
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_title(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", "title"));

        // line 3
        yield "\t";
        yield from $this->yieldParentBlock("title", $context, $blocks);
        yield "Liste des batteries (A-Z)
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 5
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_body(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", "body"));

        // line 6
        yield "\t<div class=\"container-fluid\">
\t\t<h1 class=\"text-center text-primary mt-4 pt-4 display-1 fw-bold\">
\t\t\tListe des batteries</h1>
\t\t<div class=\"row justify-content-center\">
\t\t\t<div class=\"col-12 col-md-8 bg-white p-4 m-0 text-primary text-center\">
\t\t\t\t<div class=\"table-responsive\">
\t\t\t\t\t";
        // line 12
        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.', 12, $this->source); })()), 'form_start');
        yield "
\t\t\t\t\t<table class=\"table table-hover\">
\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t<tr class=\"fw-bold text-primary\">
\t\t\t\t\t\t\t\t<th scope=\"col\">Reference</th>
\t\t\t\t\t\t\t\t<th scope=\"col\">Capacité</th>
\t\t\t\t\t\t\t\t<th scope=\"col\">Pays</th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t</thead>
\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t";
        // line 25
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::sort($this->env, (isset($context["batteries"]) || array_key_exists("batteries", $context) ? $context["batteries"] : (function () { throw new RuntimeError('Variable "batteries" does not exist.', 25, $this->source); })()), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (CoreExtension::getAttribute($this->env, $this->source,         // line 26
(isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 26, $this->source); })()), "reference", [], "any", false, false, false, 26) <=> CoreExtension::getAttribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 26, $this->source); })()), "reference", [], "any", false, false, false, 26)); }));
        $context['loop'] = [
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        ];
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["batterie"]) {
            // line 27
            yield "\t\t\t\t\t\t\t\t<tr class=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::cycle(["table-primary", "table-secondary"], CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index0", [], "any", false, false, false, 27)), "html", null, true);
            yield "\">
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">";
            // line 28
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::capitalize($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "reference", [], "any", false, false, false, 28)), "html", null, true);
            yield "</td>
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">";
            // line 29
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "capacite", [], "any", false, false, false, 29), "html", null, true);
            yield " W</td>
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">";
            // line 30
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::capitalize($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "pays", [], "any", false, false, false, 30)), "html", null, true);
            yield "</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<a href=\"";
            // line 32
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_modifier_batterie", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "id", [], "any", false, false, false, 32)]), "html", null, true);
            yield "\">
\t\t\t\t\t\t\t\t\t\t\t<i class=\"bi bi-pen-fill text-dark\"></i>
\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<a href=\"";
            // line 37
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_supprimer_batterie", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "id", [], "any", false, false, false, 37)]), "html", null, true);
            yield "\">
\t\t\t\t\t\t\t\t\t\t\t<i class=\"bi bi-trash-fill text-dark\"></i>
\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>";
            // line 41
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, 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.', 41, $this->source); })()), "batteries", [], "any", false, false, false, 41), CoreExtension::getAttribute($this->env, $this->source, $context["batterie"], "id", [], "any", false, false, false, 41), [], "array", false, false, false, 41), 'widget');
            yield "</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['batterie'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 44
        yield "\t\t\t\t\t\t</tbody>
\t\t\t\t\t</table>
\t\t\t\t\t";
        // line 46
        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.', 46, $this->source); })()), "supprimer", [], "any", false, false, false, 46), 'widget');
        yield "
\t\t\t\t\t";
        // line 47
        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.', 47, $this->source); })()), 'form_end');
        yield "
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "base/liste-batterie.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  189 => 47,  185 => 46,  181 => 44,  164 => 41,  157 => 37,  149 => 32,  144 => 30,  140 => 29,  136 => 28,  131 => 27,  115 => 26,  113 => 25,  97 => 12,  89 => 6,  79 => 5,  68 => 3,  58 => 2,  41 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends 'base.html.twig' %}
{% block title %}
\t{{parent()}}Liste des batteries (A-Z)
{% endblock %}
{% block body %}
\t<div class=\"container-fluid\">
\t\t<h1 class=\"text-center text-primary mt-4 pt-4 display-1 fw-bold\">
\t\t\tListe des batteries</h1>
\t\t<div class=\"row justify-content-center\">
\t\t\t<div class=\"col-12 col-md-8 bg-white p-4 m-0 text-primary text-center\">
\t\t\t\t<div class=\"table-responsive\">
\t\t\t\t\t{{ form_start(form) }}
\t\t\t\t\t<table class=\"table table-hover\">
\t\t\t\t\t\t<thead>
\t\t\t\t\t\t\t<tr class=\"fw-bold text-primary\">
\t\t\t\t\t\t\t\t<th scope=\"col\">Reference</th>
\t\t\t\t\t\t\t\t<th scope=\"col\">Capacité</th>
\t\t\t\t\t\t\t\t<th scope=\"col\">Pays</th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t\t<th scope=\"col\"></th>
\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t</thead>
\t\t\t\t\t\t<tbody>
\t\t\t\t\t\t\t{% for batterie in batteries |sort((a, b) =>
a.reference <=> b.reference) %}
\t\t\t\t\t\t\t\t<tr class=\"{{ cycle(['table-primary', 'table-secondary'], loop.index0) }}\">
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">{{ batterie.reference | capitalize }}</td>
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">{{ batterie.capacite }} W</td>
\t\t\t\t\t\t\t\t\t<td class=\"textstart\">{{ batterie.pays | capitalize }}</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<a href=\"{{path(\"app_modifier_batterie\",{'id':batterie.id})}}\">
\t\t\t\t\t\t\t\t\t\t\t<i class=\"bi bi-pen-fill text-dark\"></i>
\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t\t\t<a href=\"{{path(\"app_supprimer_batterie\",{'id':batterie.id})}}\">
\t\t\t\t\t\t\t\t\t\t\t<i class=\"bi bi-trash-fill text-dark\"></i>
\t\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t\t\t<td>{{ form_widget(form.batteries[batterie.id]) }}</td>
\t\t\t\t\t\t\t\t</tr>
\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t</tbody>
\t\t\t\t\t</table>
\t\t\t\t\t{{ form_widget(form.supprimer) }}
\t\t\t\t\t{{ form_end(form) }}
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
", "base/liste-batterie.html.twig", "/var/www/html/papi/templates/base/liste-batterie.html.twig");
    }
}
