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

/* tchat/_tchat_groups_type.html.twig */
class __TwigTemplate_69e257eed062178e88d87a2204cbd078a84c60946e3bf81e3e1da25c2b2cf20e 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", "tchat/_tchat_groups_type.html.twig"));

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

        // line 1
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["groupesToParses"] ?? null), (isset($context["type_agent"]) || array_key_exists("type_agent", $context) ? $context["type_agent"] : (function () { throw new RuntimeError('Variable "type_agent" does not exist.', 1, $this->source); })()), [], "array", true, true, false, 1)) {
            // line 2
            yield "    ";
            if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 2, $this->source); })()), "avec_titre"))) {
                yield "<div class=\"chat-group bg-orange text-center my-2\">TECHNICIENS</div>";
            }
            // line 3
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["groupesToParses"]) || array_key_exists("groupesToParses", $context) ? $context["groupesToParses"] : (function () { throw new RuntimeError('Variable "groupesToParses" does not exist.', 3, $this->source); })()), (isset($context["type_agent"]) || array_key_exists("type_agent", $context) ? $context["type_agent"] : (function () { throw new RuntimeError('Variable "type_agent" does not exist.', 3, $this->source); })()), [], "array", false, false, false, 3));
            $context['loop'] = [
              'parent' => $context['_parent'],
              'index0' => 0,
              'index'  => 1,
              'first'  => true,
            ];
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["_key"] => $context["groupe"]) {
                // line 4
                yield "        <div class=\"chat-people bg-white d-flex mb-2\" data-id=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "id", [], "any", false, false, false, 4), "html", null, true);
                yield "\" data-name=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 4), "html", null, true);
                yield "\" data-class=\"bg-orange\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"> <img width=\"19\" height=\"21\" class=\"me-2\" src=\"";
                // line 5
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/picto-worker-hat-orange.png"), "html", null, true);
                yield "\"></div>
            <div class=\"chat-people_name py-2\">";
                // line 6
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 6), "html", null, true);
                yield "</div>
            <div class=\"d-flex justify-content-center align-items-center\">
             ";
                // line 8
                if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 8, $this->source); })()), "avec_titre"))) {
                    // line 9
                    yield "                    <i class=\"fas fa-info-circle fa-lg color-primary tchat-infos\" ></i>
                    ";
                    // line 10
                    yield Twig\Extension\CoreExtension::include($this->env, $context, "tchat/_tchat_membres.html.twig");
                    yield "
                    ";
                    // line 11
                    if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "admin", [], "any", false, false, false, 11), "id", [], "any", false, false, false, 11), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "user", [], "any", false, false, false, 11), "id", [], "any", false, false, false, 11)))) {
                        // line 12
                        yield "                        <a data-popup-id=\"popup-tchat-groupe\" data-poppup-container=\"body\" data-dxpopup=\"\" data-content-template-ajax=\"/tchat/load/groupe/";
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "id", [], "any", false, false, false, 12), "html", null, true);
                        yield "\" data-popup-title=\"Configuration groupe\" data-popup-width=\"auto\"><i class=\"fas fa-cog fa-lg color-primary\" style=\"vertical-align: middle\"></i></a>
                    ";
                    }
                    // line 14
                    yield "            ";
                } else {
                    // line 15
                    yield "                <div class=\"numberCircle bg-vert\">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nb_messages", [], "any", false, false, false, 15), "html", null, true);
                    yield "</div>
            ";
                }
                // line 17
                yield "            </div>
        </div>
    ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['groupe'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 21
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["groupesToParses"] ?? null), (isset($context["type_interne"]) || array_key_exists("type_interne", $context) ? $context["type_interne"] : (function () { throw new RuntimeError('Variable "type_interne" does not exist.', 21, $this->source); })()), [], "array", true, true, false, 21)) {
            // line 22
            yield "    ";
            if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 22, $this->source); })()), "avec_titre"))) {
                yield "<div class=\"chat-group bg-primary text-center my-2\">SAV INTERNE</div>";
            }
            // line 23
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["groupesToParses"]) || array_key_exists("groupesToParses", $context) ? $context["groupesToParses"] : (function () { throw new RuntimeError('Variable "groupesToParses" does not exist.', 23, $this->source); })()), (isset($context["type_interne"]) || array_key_exists("type_interne", $context) ? $context["type_interne"] : (function () { throw new RuntimeError('Variable "type_interne" does not exist.', 23, $this->source); })()), [], "array", false, false, false, 23));
            foreach ($context['_seq'] as $context["_key"] => $context["groupe"]) {
                // line 24
                yield "        <div class=\"chat-people bg-white d-flex mb-2\" data-id=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "id", [], "any", false, false, false, 24), "html", null, true);
                yield "\" data-name=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 24), "html", null, true);
                yield "\" data-class=\"bg-primary\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"><img width=\"25\" height=\"25\" class=\"me-2\" src=\"";
                // line 25
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/picto-interne.svg"), "html", null, true);
                yield "\"></div>
            <div class=\"chat-people_name py-2\">";
                // line 26
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 26), "html", null, true);
                yield "</div>
             <div class=\"d-flex justify-content-center align-items-center\">
                 ";
                // line 28
                if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 28, $this->source); })()), "avec_titre"))) {
                    // line 29
                    yield "                 ";
                } else {
                    // line 30
                    yield "                     <div class=\"numberCircle bg-vert\">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nb_messages", [], "any", false, false, false, 30), "html", null, true);
                    yield "</div>
                 ";
                }
                // line 32
                yield "             </div>
        </div>
    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['groupe'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 36
        yield "
";
        // line 37
        if (CoreExtension::getAttribute($this->env, $this->source, ($context["groupesToParses"] ?? null), (isset($context["type_groupe"]) || array_key_exists("type_groupe", $context) ? $context["type_groupe"] : (function () { throw new RuntimeError('Variable "type_groupe" does not exist.', 37, $this->source); })()), [], "array", true, true, false, 37)) {
            // line 38
            yield "    ";
            if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 38, $this->source); })()), "avec_titre"))) {
                yield "<div class=\"chat-group bg-vert text-center my-2\" >GROUPES</div>";
            }
            // line 39
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["groupesToParses"]) || array_key_exists("groupesToParses", $context) ? $context["groupesToParses"] : (function () { throw new RuntimeError('Variable "groupesToParses" does not exist.', 39, $this->source); })()), (isset($context["type_groupe"]) || array_key_exists("type_groupe", $context) ? $context["type_groupe"] : (function () { throw new RuntimeError('Variable "type_groupe" does not exist.', 39, $this->source); })()), [], "array", false, false, false, 39));
            $context['loop'] = [
              'parent' => $context['_parent'],
              'index0' => 0,
              'index'  => 1,
              'first'  => true,
            ];
            if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
                $length = count($context['_seq']);
                $context['loop']['revindex0'] = $length - 1;
                $context['loop']['revindex'] = $length;
                $context['loop']['length'] = $length;
                $context['loop']['last'] = 1 === $length;
            }
            foreach ($context['_seq'] as $context["_key"] => $context["groupe"]) {
                // line 40
                yield "        <div class=\"chat-people bg-white d-flex mb-2\"  data-id=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "id", [], "any", false, false, false, 40), "html", null, true);
                yield "\" data-name=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 40), "html", null, true);
                yield "\" data-class=\"bg-vert\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"><img width=\"25\" height=\"25\" class=\"me-2\" src=\"";
                // line 41
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/picto-groupe.svg"), "html", null, true);
                yield "\"></div>
            <div class=\"chat-people_name py-2\">";
                // line 42
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nom", [], "any", false, false, false, 42), "html", null, true);
                yield "</div>
            <div class=\"d-flex justify-content-center align-items-center\">
                ";
                // line 44
                if ((0 === CoreExtension::compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 44, $this->source); })()), "avec_titre"))) {
                    // line 45
                    yield "                    <i class=\"fas fa-info-circle fa-lg color-primary tchat-infos\" ></i>
                    ";
                    // line 46
                    yield Twig\Extension\CoreExtension::include($this->env, $context, "tchat/_tchat_membres.html.twig");
                    yield "
                    ";
                    // line 47
                    if ((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "admin", [], "any", false, false, false, 47), "id", [], "any", false, false, false, 47), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 47, $this->source); })()), "user", [], "any", false, false, false, 47), "id", [], "any", false, false, false, 47)))) {
                        // line 48
                        yield "                        <a data-popup-id=\"popup-tchat-groupe\" data-poppup-container=\"body\" data-dxpopup=\"\" data-content-template-ajax=\"/tchat/load/groupe/";
                        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "id", [], "any", false, false, false, 48), "html", null, true);
                        yield "\" data-popup-title=\"Configuration groupe\" data-popup-width=\"auto\"><i class=\"fas fa-cog fa-lg color-primary\" style=\"vertical-align: middle\"></i></a>
                    ";
                    }
                    // line 50
                    yield "                ";
                } else {
                    // line 51
                    yield "                    <div class=\"numberCircle bg-vert\">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["groupe"], "nb_messages", [], "any", false, false, false, 51), "html", null, true);
                    yield "</div>
                ";
                }
                // line 53
                yield "            </div>
        </div>
    ";
                ++$context['loop']['index0'];
                ++$context['loop']['index'];
                $context['loop']['first'] = false;
                if (isset($context['loop']['length'])) {
                    --$context['loop']['revindex0'];
                    --$context['loop']['revindex'];
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['groupe'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  246 => 53,  240 => 51,  237 => 50,  231 => 48,  229 => 47,  225 => 46,  222 => 45,  220 => 44,  215 => 42,  211 => 41,  204 => 40,  186 => 39,  181 => 38,  179 => 37,  176 => 36,  167 => 32,  161 => 30,  158 => 29,  156 => 28,  151 => 26,  147 => 25,  140 => 24,  135 => 23,  130 => 22,  128 => 21,  111 => 17,  105 => 15,  102 => 14,  96 => 12,  94 => 11,  90 => 10,  87 => 9,  85 => 8,  80 => 6,  76 => 5,  69 => 4,  51 => 3,  46 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% if groupesToParses[type_agent] is defined %}
    {% if type == 'avec_titre' %}<div class=\"chat-group bg-orange text-center my-2\">TECHNICIENS</div>{% endif %}
    {% for groupe in groupesToParses[type_agent] %}
        <div class=\"chat-people bg-white d-flex mb-2\" data-id=\"{{ groupe.id }}\" data-name=\"{{ groupe.nom }}\" data-class=\"bg-orange\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"> <img width=\"19\" height=\"21\" class=\"me-2\" src=\"{{ asset('build/images/picto-worker-hat-orange.png') }}\"></div>
            <div class=\"chat-people_name py-2\">{{ groupe.nom }}</div>
            <div class=\"d-flex justify-content-center align-items-center\">
             {% if type == 'avec_titre' %}
                    <i class=\"fas fa-info-circle fa-lg color-primary tchat-infos\" ></i>
                    {{ include('tchat/_tchat_membres.html.twig') }}
                    {% if groupe.admin.id == app.user.id %}
                        <a data-popup-id=\"popup-tchat-groupe\" data-poppup-container=\"body\" data-dxpopup=\"\" data-content-template-ajax=\"/tchat/load/groupe/{{ groupe.id }}\" data-popup-title=\"Configuration groupe\" data-popup-width=\"auto\"><i class=\"fas fa-cog fa-lg color-primary\" style=\"vertical-align: middle\"></i></a>
                    {% endif %}
            {% else %}
                <div class=\"numberCircle bg-vert\">{{ groupe.nb_messages}}</div>
            {% endif %}
            </div>
        </div>
    {% endfor %}
{% endif %}
{% if groupesToParses[type_interne] is defined %}
    {% if type == 'avec_titre' %}<div class=\"chat-group bg-primary text-center my-2\">SAV INTERNE</div>{% endif %}
    {% for groupe in groupesToParses[type_interne] %}
        <div class=\"chat-people bg-white d-flex mb-2\" data-id=\"{{ groupe.id }}\" data-name=\"{{ groupe.nom }}\" data-class=\"bg-primary\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"><img width=\"25\" height=\"25\" class=\"me-2\" src=\"{{ asset('build/images/picto-interne.svg') }}\"></div>
            <div class=\"chat-people_name py-2\">{{ groupe.nom }}</div>
             <div class=\"d-flex justify-content-center align-items-center\">
                 {% if type == 'avec_titre' %}
                 {% else %}
                     <div class=\"numberCircle bg-vert\">{{ groupe.nb_messages}}</div>
                 {% endif %}
             </div>
        </div>
    {% endfor %}
{% endif %}

{% if groupesToParses[type_groupe] is defined %}
    {% if type == 'avec_titre' %}<div class=\"chat-group bg-vert text-center my-2\" >GROUPES</div>{% endif %}
    {% for groupe in groupesToParses[type_groupe] %}
        <div class=\"chat-people bg-white d-flex mb-2\"  data-id=\"{{ groupe.id }}\" data-name=\"{{ groupe.nom }}\" data-class=\"bg-vert\">
            <div class=\"chat-people_first ms-2 d-flex justify-content-center align-items-center\"><img width=\"25\" height=\"25\" class=\"me-2\" src=\"{{ asset('build/images/picto-groupe.svg') }}\"></div>
            <div class=\"chat-people_name py-2\">{{ groupe.nom }}</div>
            <div class=\"d-flex justify-content-center align-items-center\">
                {% if type == 'avec_titre' %}
                    <i class=\"fas fa-info-circle fa-lg color-primary tchat-infos\" ></i>
                    {{ include('tchat/_tchat_membres.html.twig') }}
                    {% if groupe.admin.id == app.user.id %}
                        <a data-popup-id=\"popup-tchat-groupe\" data-poppup-container=\"body\" data-dxpopup=\"\" data-content-template-ajax=\"/tchat/load/groupe/{{ groupe.id }}\" data-popup-title=\"Configuration groupe\" data-popup-width=\"auto\"><i class=\"fas fa-cog fa-lg color-primary\" style=\"vertical-align: middle\"></i></a>
                    {% endif %}
                {% else %}
                    <div class=\"numberCircle bg-vert\">{{ groupe.nb_messages}}</div>
                {% endif %}
            </div>
        </div>
    {% endfor %}
{% endif %}", "tchat/_tchat_groups_type.html.twig", "/builds/dev/refonte_sav/templates/tchat/_tchat_groups_type.html.twig");
    }
}
