<?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/_search_contrat_result.html.twig */
class __TwigTemplate_b971f9a70ad84997d1b87813552f7c962ee67c657a7d620605426aa31dab065e 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/_search_contrat_result.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/_search_contrat_result.html.twig"));

        // line 1
        yield "<div class=\"d-flex align-items-center me-5\">
    <label style=\"width:61px;\" class=\"me-1\">Resultats</label>

    <form id=\"form-add-groupe-contrat\" class=\"form-ajax d-flex\" action=\"";
        // line 4
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("add_contrat_groupe", ["id" => (isset($context["idContrat"]) || array_key_exists("idContrat", $context) ? $context["idContrat"] : (function () { throw new RuntimeError('Variable "idContrat" does not exist.', 4, $this->source); })())]), "html", null, true);
        yield "\" data-target-html=\"#list-contrats-groupe-";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["idContrat"]) || array_key_exists("idContrat", $context) ? $context["idContrat"] : (function () { throw new RuntimeError('Variable "idContrat" does not exist.', 4, $this->source); })()), "html", null, true);
        yield "\">
        <select name=\"contrat-group-select\" style=\"width:auto;max-width: 650px\" class=\"form-control me-2\" id=\"contrat-group-select\">
            ";
        // line 6
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["contrats"]) || array_key_exists("contrats", $context) ? $context["contrats"] : (function () { throw new RuntimeError('Variable "contrats" does not exist.', 6, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["contrat"]) {
            // line 7
            yield "                ";
            $context["equipement"] = CoreExtension::getAttribute($this->env, $this->source, $context["contrat"], "equipement", [], "any", false, false, false, 7);
            // line 8
            yield "                ";
            $context["adresse"] = 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.', 8, $this->source); })()), "adresse", [], "any", false, false, false, 8);
            // line 9
            yield "                ";
            $context["client"] = CoreExtension::getAttribute($this->env, $this->source, $context["contrat"], "client", [], "any", false, false, false, 9);
            // line 10
            yield "                <option value=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["contrat"], "id", [], "any", false, false, false, 10), "html", null, true);
            yield "\">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((((((((((((CoreExtension::getAttribute($this->env, $this->source, $context["contrat"], "groupe", [], "any", false, false, false, 10) . " - ") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 10, $this->source); })()), "prenom", [], "any", false, false, false, 10)) . " ") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["client"]) || array_key_exists("client", $context) ? $context["client"] : (function () { throw new RuntimeError('Variable "client" does not exist.', 10, $this->source); })()), "nom", [], "any", false, false, false, 10)) . " - ") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["adresse"]) || array_key_exists("adresse", $context) ? $context["adresse"] : (function () { throw new RuntimeError('Variable "adresse" does not exist.', 10, $this->source); })()), "adresse", [], "any", false, false, false, 10)) . ", ") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["adresse"]) || array_key_exists("adresse", $context) ? $context["adresse"] : (function () { throw new RuntimeError('Variable "adresse" does not exist.', 10, $this->source); })()), "codePostal", [], "any", false, false, false, 10)) . " ") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["adresse"]) || array_key_exists("adresse", $context) ? $context["adresse"] : (function () { throw new RuntimeError('Variable "adresse" does not exist.', 10, $this->source); })()), "ville", [], "any", false, false, false, 10)) . " - ") . 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.', 10, $this->source); })()), "numSeriePrincipal", [], "any", false, false, false, 10)), "html", null, true);
            yield "</option>
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['contrat'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 12
        yield "            ";
        if ((isset($context["contrats"]) || array_key_exists("contrats", $context) ? $context["contrats"] : (function () { throw new RuntimeError('Variable "contrats" does not exist.', 12, $this->source); })())) {
            // line 13
            yield "                <input  type=\"submit\" class=\"btn btn-success\" value=\"Ajouter l'équipement\" >
            ";
        }
        // line 15
        yield "        </select>
    </form>

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

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  87 => 15,  83 => 13,  80 => 12,  69 => 10,  66 => 9,  63 => 8,  60 => 7,  56 => 6,  49 => 4,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div class=\"d-flex align-items-center me-5\">
    <label style=\"width:61px;\" class=\"me-1\">Resultats</label>

    <form id=\"form-add-groupe-contrat\" class=\"form-ajax d-flex\" action=\"{{ path('add_contrat_groupe', {'id' : idContrat}) }}\" data-target-html=\"#list-contrats-groupe-{{ idContrat }}\">
        <select name=\"contrat-group-select\" style=\"width:auto;max-width: 650px\" class=\"form-control me-2\" id=\"contrat-group-select\">
            {% for contrat in contrats %}
                {% set equipement = contrat.equipement %}
                {% set adresse = equipement.adresse %}
                {% set client = contrat.client %}
                <option value=\"{{ contrat.id }}\">{{ contrat.groupe ~ ' - ' ~ client.prenom ~' ' ~ client.nom ~ ' - ' ~ adresse.adresse ~ ', ' ~ adresse.codePostal ~ ' ' ~ adresse.ville ~ ' - ' ~ equipement.numSeriePrincipal }}</option>
            {% endfor %}
            {% if contrats %}
                <input  type=\"submit\" class=\"btn btn-success\" value=\"Ajouter l'équipement\" >
            {% endif %}
        </select>
    </form>

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