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

        // line 1
        yield "<label style=\"width:";
        yield (((isset($context["is_pac"]) || array_key_exists("is_pac", $context) ? $context["is_pac"] : (function () { throw new RuntimeError('Variable "is_pac" does not exist.', 1, $this->source); })())) ? ("111") : ("47"));
        yield "px;\" class=\"me-1\">Local</label>
";
        // line 2
        if ((array_key_exists("affichage", $context) && (0 !== CoreExtension::compare((isset($context["affichage"]) || array_key_exists("affichage", $context) ? $context["affichage"] : (function () { throw new RuntimeError('Variable "affichage" does not exist.', 2, $this->source); })()), "client")))) {
            // line 3
            yield "    <input  style=\"width:130px\" class=\"form-control\" disabled value=\"";
            ((((isset($context["equipement"]) || array_key_exists("equipement", $context) ? $context["equipement"] : (function () { throw new RuntimeError('Variable "equipement" does not exist.', 3, $this->source); })()) && 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); })()), "equipementLocal", [], "any", false, false, false, 3))) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, 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); })()), "equipementLocal", [], "any", false, false, false, 3), "libelle", [], "any", false, false, false, 3), "html", null, true)) : (yield ""));
            yield "\">
";
        } else {
            // line 5
            yield "    <select form=\"form_client_update\" data-disable-on-view=\"\" name=\"equipement_local-";
            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.', 5, $this->source); })()), "id", [], "any", false, false, false, 5), "html", null, true);
            yield "\" style=\"width:100px\" ";
            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.', 5, $this->source); })()), "html", null, true);
            yield " class=\"form-control me-1\">
        ";
            // line 6
            $context["autre_option"] = "";
            // line 7
            yield "        ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable((isset($context["locaux"]) || array_key_exists("locaux", $context) ? $context["locaux"] : (function () { throw new RuntimeError('Variable "locaux" does not exist.', 7, $this->source); })()));
            foreach ($context['_seq'] as $context["_key"] => $context["local"]) {
                // line 8
                yield "            ";
                if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["local"], "libelle", [], "any", false, false, false, 8), "Autre"))) {
                    // line 9
                    yield "                ";
                    $context["selected"] = (((((isset($context["equipement"]) || array_key_exists("equipement", $context) ? $context["equipement"] : (function () { throw new RuntimeError('Variable "equipement" does not exist.', 9, $this->source); })()) && 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.', 9, $this->source); })()), "equipementLocal", [], "any", false, false, false, 9)) && (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, 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.', 9, $this->source); })()), "equipementLocal", [], "any", false, false, false, 9), "id", [], "any", false, false, false, 9), CoreExtension::getAttribute($this->env, $this->source, $context["local"], "id", [], "any", false, false, false, 9))))) ? ("selected") : (""));
                    // line 10
                    yield "                ";
                    $context["autre_option"] = (((((("<option value=\"" . CoreExtension::getAttribute($this->env, $this->source, $context["local"], "id", [], "any", false, false, false, 10)) . "\" ") . (isset($context["selected"]) || array_key_exists("selected", $context) ? $context["selected"] : (function () { throw new RuntimeError('Variable "selected" does not exist.', 10, $this->source); })())) . ">") . CoreExtension::getAttribute($this->env, $this->source, $context["local"], "libelle", [], "any", false, false, false, 10)) . "</option>");
                    // line 11
                    yield "            ";
                } else {
                    // line 12
                    yield "                ";
                    $context["selected"] = (((((isset($context["equipement"]) || array_key_exists("equipement", $context) ? $context["equipement"] : (function () { throw new RuntimeError('Variable "equipement" does not exist.', 12, $this->source); })()) && 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.', 12, $this->source); })()), "equipementLocal", [], "any", false, false, false, 12)) && (0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, 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.', 12, $this->source); })()), "equipementLocal", [], "any", false, false, false, 12), "id", [], "any", false, false, false, 12), CoreExtension::getAttribute($this->env, $this->source, $context["local"], "id", [], "any", false, false, false, 12))))) ? ("selected") : (""));
                    // line 13
                    yield "                <option value=\"";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["local"], "id", [], "any", false, false, false, 13), "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.', 13, $this->source); })()), "html", null, true);
                    yield ">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["local"], "libelle", [], "any", false, false, false, 13), "html", null, true);
                    yield "</option>
            ";
                }
                // line 15
                yield "        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['local'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 16
            yield "        ";
            yield (isset($context["autre_option"]) || array_key_exists("autre_option", $context) ? $context["autre_option"] : (function () { throw new RuntimeError('Variable "autre_option" does not exist.', 16, $this->source); })());
            yield "
    </select>
    <a data-popup-position-of=\"center\" data-popup-position-at=\"top\" data-disable-on-view=\"\" data-popup-id=\"popup-history-equipement-local\" data-poppup-container=\"body\" data-dxpopup=\"\" data-popup-title=\"Historique Equipement Local\" data-popup-width=\"auto\" data-popup-offset=\"0 275\" >
        <div class=\"d-flex align align-self-end bg-white justify-content-center align-items-center border-grey-field\" style=\";width: 28px;height: 28px;border-radius:4px\">
            <i class=\"fa fa-lg fa-history custom-history color-primary\" style=\"position:relative;right:-2px;top:0px;\" ></i>
        </div>
    </a>
";
        }
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  102 => 16,  96 => 15,  86 => 13,  83 => 12,  80 => 11,  77 => 10,  74 => 9,  71 => 8,  66 => 7,  64 => 6,  57 => 5,  51 => 3,  49 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<label style=\"width:{{ is_pac ? '111' : '47' }}px;\" class=\"me-1\">Local</label>
{% if affichage is defined and affichage != 'client' %}
    <input  style=\"width:130px\" class=\"form-control\" disabled value=\"{{  equipement and equipement.equipementLocal ? equipement.equipementLocal.libelle }}\">
{% else %}
    <select form=\"form_client_update\" data-disable-on-view=\"\" name=\"equipement_local-{{ equipement.id }}\" style=\"width:100px\" {{ disabled }} class=\"form-control me-1\">
        {% set autre_option = '' %}
        {% for local in locaux %}
            {% if local.libelle == 'Autre' %}
                {% set selected =  (equipement and equipement.equipementLocal and equipement.equipementLocal.id == local.id) ? 'selected' : '' %}
                {% set autre_option = '<option value=\"' ~ local.id ~ '\" ' ~ selected ~ '>' ~ local.libelle ~ '</option>' %}
            {% else %}
                {% set selected =  (equipement and equipement.equipementLocal and equipement.equipementLocal.id == local.id) ? 'selected' : '' %}
                <option value=\"{{ local.id }}\" {{ selected }}>{{ local.libelle }}</option>
            {% endif %}
        {% endfor %}
        {{ autre_option|raw }}
    </select>
    <a data-popup-position-of=\"center\" data-popup-position-at=\"top\" data-disable-on-view=\"\" data-popup-id=\"popup-history-equipement-local\" data-poppup-container=\"body\" data-dxpopup=\"\" data-popup-title=\"Historique Equipement Local\" data-popup-width=\"auto\" data-popup-offset=\"0 275\" >
        <div class=\"d-flex align align-self-end bg-white justify-content-center align-items-center border-grey-field\" style=\";width: 28px;height: 28px;border-radius:4px\">
            <i class=\"fa fa-lg fa-history custom-history color-primary\" style=\"position:relative;right:-2px;top:0px;\" ></i>
        </div>
    </a>
{% endif %}
", "clients/informations_technique/_local.html.twig", "/builds/dev/refonte_sav/templates/clients/informations_technique/_local.html.twig");
    }
}
