<?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/contrat/fields/_type_contrat.html.twig */
class __TwigTemplate_d51960e46577197a8deea5076f966c8764b7a0a4799f2f8b04ecb73adf1fc350 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/contrat/fields/_type_contrat.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/contrat/fields/_type_contrat.html.twig"));

        // line 1
        yield "
<label style=\"width: 34px;\">Type</label>
<select name=\"contrat_type-";
        // line 3
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(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.', 3, $this->source); })()), "id", [], "any", false, false, false, 3), "html", null, true);
        yield "\" data-disable-on-view=\"\" style=\"width:86px;\" ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["disabled"]) || array_key_exists("disabled", $context) ? $context["disabled"] : (function () { throw new RuntimeError('Variable "disabled" does not exist.', 3, $this->source); })()), "html", null, true);
        yield " class=\"form-control \" id=\"contrat_type\" form=\"form_client_update\">
    <option value=\"\" ";
        // line 4
        yield ((((isset($context["contrat"]) || array_key_exists("contrat", $context) ? $context["contrat"] : (function () { throw new RuntimeError('Variable "contrat" does not exist.', 4, $this->source); })()) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["contrat"]) || array_key_exists("contrat", $context) ? $context["contrat"] : (function () { throw new RuntimeError('Variable "contrat" does not exist.', 4, $this->source); })()), "ContratType", [], "any", false, false, false, 4))) ? ("") : ("selected"));
        yield "></option>
    ";
        // line 5
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["typesContrat"]) || array_key_exists("typesContrat", $context) ? $context["typesContrat"] : (function () { throw new RuntimeError('Variable "typesContrat" does not exist.', 5, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["type"]) {
            // line 6
            yield "        ";
            $context["selected"] = (((((isset($context["contrat"]) || array_key_exists("contrat", $context) ? $context["contrat"] : (function () { throw new RuntimeError('Variable "contrat" does not exist.', 6, $this->source); })()) && CoreExtension::getAttribute($this->env, $this->source, (isset($context["contrat"]) || array_key_exists("contrat", $context) ? $context["contrat"] : (function () { throw new RuntimeError('Variable "contrat" does not exist.', 6, $this->source); })()), "ContratType", [], "any", false, false, false, 6)) && (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["contrat"]) || array_key_exists("contrat", $context) ? $context["contrat"] : (function () { throw new RuntimeError('Variable "contrat" does not exist.', 6, $this->source); })()), "ContratType", [], "any", false, false, false, 6), "id", [], "any", false, false, false, 6), CoreExtension::getAttribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 6))))) ? ("selected") : (""));
            // line 7
            yield "        <option value=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["type"], "id", [], "any", false, false, false, 7), "html", null, true);
            yield "\" ";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["selected"]) || array_key_exists("selected", $context) ? $context["selected"] : (function () { throw new RuntimeError('Variable "selected" does not exist.', 7, $this->source); })()), "html", null, true);
            yield ">";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["type"], "libelleCourt", [], "any", false, false, false, 7), "html", null, true);
            yield "</option>
    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['type'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 9
        yield "</select>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  78 => 9,  65 => 7,  62 => 6,  58 => 5,  54 => 4,  48 => 3,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("
<label style=\"width: 34px;\">Type</label>
<select name=\"contrat_type-{{ equipement.id }}\" data-disable-on-view=\"\" style=\"width:86px;\" {{ disabled }} class=\"form-control \" id=\"contrat_type\" form=\"form_client_update\">
    <option value=\"\" {{contrat and contrat.ContratType ? '' : 'selected' }}></option>
    {% for type in typesContrat %}
        {% set selected =  (contrat and contrat.ContratType and contrat.ContratType.id == type.id) ? 'selected' : '' %}
        <option value=\"{{ type.id }}\" {{ selected }}>{{ type.libelleCourt }}</option>
    {% endfor %}
</select>", "clients/contrat/fields/_type_contrat.html.twig", "/builds/dev/refonte_sav/templates/clients/contrat/fields/_type_contrat.html.twig");
    }
}
