<?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;
use Twig\TemplateWrapper;

/* partials/roles.html.twig */
class __TwigTemplate_4006afbcb25efc2c816db84817fc9e8c extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $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 = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "partials/roles.html.twig"));

        // line 1
        $context["role_icon"] = ["ROLE_ADMIN" => "user-cog", "ROLE_MANAGER" => "user-shield", "ROLE_DPP" => "user-check", "ROLE_FOCAL" => "user-tag", "ROLE_USER" => "user"];
        // line 8
        yield "
<span class=\"role-icons\">
    ";
        // line 10
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["user"]) || array_key_exists("user", $context) ? $context["user"] : (function () { throw new RuntimeError('Variable "user" does not exist.', 10, $this->source); })()), "roles", [], "any", false, false, false, 10));
        foreach ($context['_seq'] as $context["_key"] => $context["role"]) {
            // line 11
            yield "        ";
            if (CoreExtension::getAttribute($this->env, $this->source, ($context["role_icon"] ?? null), $context["role"], [], "array", true, true, false, 11)) {
                // line 12
                yield "            <i class=\"fa fa-lg fa-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["role_icon"]) || array_key_exists("role_icon", $context) ? $context["role_icon"] : (function () { throw new RuntimeError('Variable "role_icon" does not exist.', 12, $this->source); })()), $context["role"], [], "array", false, false, false, 12), "html", null, true);
                yield "\" title=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["role"]), "html", null, true);
                yield "\"></i>
        ";
            } else {
                // line 14
                yield "            ";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["role"], "html", null, true);
                yield "
        ";
            }
            // line 16
            yield "    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['role'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 17
        yield "</span>
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "partials/roles.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  78 => 17,  72 => 16,  66 => 14,  58 => 12,  55 => 11,  51 => 10,  47 => 8,  45 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% set role_icon = {
  'ROLE_ADMIN':     'user-cog',
  'ROLE_MANAGER':   'user-shield',
  'ROLE_DPP':       'user-check',
  'ROLE_FOCAL':     'user-tag',
  'ROLE_USER':      'user',
} %}

<span class=\"role-icons\">
    {% for role in user.roles %}
        {% if role_icon[role] is defined %}
            <i class=\"fa fa-lg fa-{{ role_icon[role] }}\" title=\"{{ (role)|trans }}\"></i>
        {% else %}
            {{ role }}
        {% endif %}
    {% endfor %}
</span>
", "partials/roles.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/partials/roles.html.twig");
    }
}
