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

/* intervention/_select_intervention_agent.html.twig */
class __TwigTemplate_346add78d1cfa2e66c118299f1bf6e1d3acecc43db34ab3b930d7ee6cba0c92a 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", "intervention/_select_intervention_agent.html.twig"));

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

        // line 1
        yield "<label class=\"white me-2  control-label align-self-center\" for=\"intervention_agent\" >Agent</label>
<select name=\"intervention_agent\" style=\"width:auto;max-width: inherit\" class=\"form-control bg-grey\" id=\"intervention_agent\" required>
    <option value=\"\">Sélectionnez [...]</option>
    ";
        // line 4
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable((isset($context["agents"]) || array_key_exists("agents", $context) ? $context["agents"] : (function () { throw new RuntimeError('Variable "agents" does not exist.', 4, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
            // line 5
            yield "        ";
            $context["count"] = (((array_key_exists("interventionStats", $context) && CoreExtension::getAttribute($this->env, $this->source, ($context["interventionStats"] ?? null), CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 5), [], "array", true, true, false, 5))) ? (CoreExtension::getAttribute($this->env, $this->source, (isset($context["interventionStats"]) || array_key_exists("interventionStats", $context) ? $context["interventionStats"] : (function () { throw new RuntimeError('Variable "interventionStats" does not exist.', 5, $this->source); })()), CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 5), [], "array", false, false, false, 5)) : (0));
            // line 6
            yield "        <option value=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 6), "html", null, true);
            yield " \">
            ";
            // line 7
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["agent"], "getCodeNom", [], "any", false, false, false, 7), "html", null, true);
            if ((1 === CoreExtension::compare((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 7, $this->source); })()), 0))) {
                yield " (";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 7, $this->source); })()), "html", null, true);
                yield ")";
            }
            // line 8
            yield "        </option>
    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 10
        yield "</select>";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  75 => 10,  68 => 8,  61 => 7,  56 => 6,  53 => 5,  49 => 4,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<label class=\"white me-2  control-label align-self-center\" for=\"intervention_agent\" >Agent</label>
<select name=\"intervention_agent\" style=\"width:auto;max-width: inherit\" class=\"form-control bg-grey\" id=\"intervention_agent\" required>
    <option value=\"\">Sélectionnez [...]</option>
    {% for agent in agents %}
        {% set count = interventionStats is defined and interventionStats[agent.id] is defined ? interventionStats[agent.id] : 0 %}
        <option value=\"{{ agent.id }} \">
            {{ agent.getCodeNom }}{% if count > 0 %} ({{ count }}){% endif %}
        </option>
    {% endfor %}
</select>", "intervention/_select_intervention_agent.html.twig", "/builds/dev/refonte_sav/templates/intervention/_select_intervention_agent.html.twig");
    }
}
