<?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/localisation/_complements_adresse_view_result.html.twig */
class __TwigTemplate_7f80002aa74bf8b8d31e1f5159d2a186b5d66358bbdfa98118b4eb8d1b0e9243 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/localisation/_complements_adresse_view_result.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/localisation/_complements_adresse_view_result.html.twig"));

        // line 1
        yield "
";
        // line 2
        if (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.', 2, $this->source); })()), "adresse", [], "any", false, false, false, 2)) {
            // line 3
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(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); })()), "adresse", [], "any", false, false, false, 3), "getAdresseComplements", [], "any", 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["adresse_complement"]) {
                // line 4
                yield "        ";
                $context["commentaire"] = ((CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "getCommentaireValeur", [], "any", false, false, false, 4)) ? (((" (" . CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "getCommentaireValeur", [], "any", false, false, false, 4)) . ")")) : (""));
                // line 5
                yield "        ";
                $context["popup_id"] = ("popup-maj-complement-" . CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "id", [], "any", false, false, false, 5));
                // line 6
                yield "    <span id=\"adresse_complement-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "id", [], "any", false, false, false, 6), "html", null, true);
                yield "\" style=\"padding: 4px 2px;vertical-align: middle;  background-color: #FFFFFF;  border-left: 1px solid #FFEAD5;  border-top: 1px solid #FFEAD5;  border-right: 1px solid #FFEAD5;  border-bottom: 1px solid #FFEAD5;  border-radius: 4px;\">
            <a data-popup-id=\"";
                // line 7
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["popup_id"]) || array_key_exists("popup_id", $context) ? $context["popup_id"] : (function () { throw new RuntimeError('Variable "popup_id" does not exist.', 7, $this->source); })()), "html", null, true);
                yield "\"  data-dxpopup=\"\"  data-popup-title=\"Complément d'adresse\"   data-poppup-container=\"body\" data-popup-width=\"auto\" >
                    ";
                // line 8
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((((CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "getTypeComplementAdresse", [], "any", false, false, false, 8) . " : ") . CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "valeur", [], "any", false, false, false, 8)) . (isset($context["commentaire"]) || array_key_exists("commentaire", $context) ? $context["commentaire"] : (function () { throw new RuntimeError('Variable "commentaire" does not exist.', 8, $this->source); })())), "html", null, true);
                yield "
            </a>
            <a data-confirm=\"1\" data-ajax=\"true\" data-href=\"";
                // line 10
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("delete_adresse_complement", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "id", [], "any", false, false, false, 10)]), "html", null, true);
                yield "\" data-disable-on-view=\"\" data-js=\"\$('#adresse_complement-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["adresse_complement"], "id", [], "any", false, false, false, 10), "html", null, true);
                yield "').remove();\" ><i class=\"fa fa-times ms-3\" aria-hidden=\"true\" style=\"color: rgb(55,79,102) !important;cursor: pointer\"></i></a>
    </span>
        ";
                // line 12
                yield Twig\Extension\CoreExtension::include($this->env, $context, "clients/localisation/_popup_complement_adresse.html.twig");
                yield "
    ";
                ++$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['adresse_complement'], $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 "clients/localisation/_complements_adresse_view_result.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  94 => 12,  87 => 10,  82 => 8,  78 => 7,  73 => 6,  70 => 5,  67 => 4,  49 => 3,  47 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("
{% if equipement.adresse %}
    {% for adresse_complement in  equipement.adresse.getAdresseComplements %}
        {% set commentaire = adresse_complement.getCommentaireValeur ? ' (' ~ adresse_complement.getCommentaireValeur ~')' : '' %}
        {% set popup_id =  \"popup-maj-complement-\"~ adresse_complement.id %}
    <span id=\"adresse_complement-{{ adresse_complement.id }}\" style=\"padding: 4px 2px;vertical-align: middle;  background-color: #FFFFFF;  border-left: 1px solid #FFEAD5;  border-top: 1px solid #FFEAD5;  border-right: 1px solid #FFEAD5;  border-bottom: 1px solid #FFEAD5;  border-radius: 4px;\">
            <a data-popup-id=\"{{  popup_id }}\"  data-dxpopup=\"\"  data-popup-title=\"Complément d'adresse\"   data-poppup-container=\"body\" data-popup-width=\"auto\" >
                    {{ adresse_complement.getTypeComplementAdresse ~ ' : ' ~ adresse_complement.valeur ~ commentaire}}
            </a>
            <a data-confirm=\"1\" data-ajax=\"true\" data-href=\"{{ path('delete_adresse_complement', { 'id' : adresse_complement.id}) }}\" data-disable-on-view=\"\" data-js=\"\$('#adresse_complement-{{ adresse_complement.id }}').remove();\" ><i class=\"fa fa-times ms-3\" aria-hidden=\"true\" style=\"color: rgb(55,79,102) !important;cursor: pointer\"></i></a>
    </span>
        {{ include('clients/localisation/_popup_complement_adresse.html.twig') }}
    {%endfor %}
{% endif %}", "clients/localisation/_complements_adresse_view_result.html.twig", "/builds/dev/refonte_sav/templates/clients/localisation/_complements_adresse_view_result.html.twig");
    }
}
