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

/* clients/informations_technique/_popup_history_equipement_options.html.twig */
class __TwigTemplate_8780eb4aa62009cad05db035dacd137affb6b6856cf2dcc09066eb3815754d6e extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "clients/informations_technique/_popup_history_equipement_options.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "clients/informations_technique/_popup_history_equipement_options.html.twig"));

        // line 1
        yield "<div id=\"popup-history-equipement-options\" style=\"display:none\" >
    ";
        // line 2
        $context["historiqueEquipementOptions"] = Twig\Extension\CoreExtension::sort($this->env, CoreExtension::getAttribute($this->env, $this->source, (isset($context["equipement"]) || array_key_exists("equipement", $context) ? $context["equipement"] : (function () { throw new RuntimeError('Variable "equipement" does not exist.', 2, $this->source); })()), "getHistoriqueEquipementOptions", [], "any", false, false, false, 2), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (((1 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 2, $this->source); })()), "dateDebut", [], "any", false, false, false, 2), 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.', 2, $this->source); })()), "dateDebut", [], "any", false, false, false, 2)))) ? ( -1) : (1)); });
        // line 3
        yield "    <table class=\"table table-responsive table-bordered  table-sm table-inverse-color-datagrid mb-0\">
        <thead  align=\"center\" style=\"vertical-align: middle!important;\">
        <th style=\"text-align: left\">Type</th>
        <th>Etat</th>
        <th>Date</th>
        <th>Date d'effet</th>
        <th>Tarif HT</th>
        </thead>
        <tbody style=\"height: 99px\">
        ";
        // line 12
        if ((1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["historiqueEquipementOptions"]) || array_key_exists("historiqueEquipementOptions", $context) ? $context["historiqueEquipementOptions"] : (function () { throw new RuntimeError('Variable "historiqueEquipementOptions" does not exist.', 12, $this->source); })())), 0))) {
            // line 13
            yield "            ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable((isset($context["historiqueEquipementOptions"]) || array_key_exists("historiqueEquipementOptions", $context) ? $context["historiqueEquipementOptions"] : (function () { throw new RuntimeError('Variable "historiqueEquipementOptions" does not exist.', 13, $this->source); })()));
            foreach ($context['_seq'] as $context["_key"] => $context["EquipementOption"]) {
                // line 14
                yield "                <tr>
                    <td>";
                // line 15
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["EquipementOption"], "option", [], "any", false, false, false, 15), "getLibelleCourt", [], "any", false, false, false, 15), "html", null, true);
                yield "</td>
                    <td>Résilié</td>
                    <td class=\"text-center\">";
                // line 17
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["EquipementOption"], "getDateSouscription", [], "any", false, false, false, 17), "d/m/Y"), "html", null, true);
                yield "</td>
                    <td class=\"text-center\">";
                // line 18
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["EquipementOption"], "getDateFin", [], "any", false, false, false, 18), "d/m/Y"), "html", null, true);
                yield "</td>
                    <td class=\"text-center\">";
                // line 19
                ((CoreExtension::getAttribute($this->env, $this->source, $context["EquipementOption"], "getPrixHt", [], "any", false, false, false, 19)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((CoreExtension::getAttribute($this->env, $this->source, $context["EquipementOption"], "getPrixHt", [], "any", false, false, false, 19) . "€"), "html", null, true)) : (yield ""));
                yield "</td>
                </tr>
            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['EquipementOption'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 22
            yield "        ";
        } else {
            // line 23
            yield "            <tr style=\"height: 40px\"><td colspan=\"6\" ></td></tr>
        ";
        }
        // line 25
        yield "        </tbody>
    </table>

</div>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "clients/informations_technique/_popup_history_equipement_options.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  99 => 25,  95 => 23,  92 => 22,  83 => 19,  79 => 18,  75 => 17,  70 => 15,  67 => 14,  62 => 13,  60 => 12,  49 => 3,  47 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div id=\"popup-history-equipement-options\" style=\"display:none\" >
    {% set historiqueEquipementOptions = equipement.getHistoriqueEquipementOptions | sort((a, b) => a.dateDebut > b.dateDebut ? -1 : 1) %}
    <table class=\"table table-responsive table-bordered  table-sm table-inverse-color-datagrid mb-0\">
        <thead  align=\"center\" style=\"vertical-align: middle!important;\">
        <th style=\"text-align: left\">Type</th>
        <th>Etat</th>
        <th>Date</th>
        <th>Date d'effet</th>
        <th>Tarif HT</th>
        </thead>
        <tbody style=\"height: 99px\">
        {% if historiqueEquipementOptions|length > 0 %}
            {% for EquipementOption in historiqueEquipementOptions %}
                <tr>
                    <td>{{ EquipementOption.option.getLibelleCourt }}</td>
                    <td>Résilié</td>
                    <td class=\"text-center\">{{ EquipementOption.getDateSouscription|date(\"d/m/Y\") }}</td>
                    <td class=\"text-center\">{{ EquipementOption.getDateFin|date(\"d/m/Y\") }}</td>
                    <td class=\"text-center\">{{ EquipementOption.getPrixHt ? EquipementOption.getPrixHt~'€' }}</td>
                </tr>
            {% endfor %}
        {% else %}
            <tr style=\"height: 40px\"><td colspan=\"6\" ></td></tr>
        {% endif %}
        </tbody>
    </table>

</div>", "clients/informations_technique/_popup_history_equipement_options.html.twig", "/builds/dev/refonte_sav/templates/clients/informations_technique/_popup_history_equipement_options.html.twig");
    }
}
