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

/* tarif/piece_tarif.html.twig */
class __TwigTemplate_6a9f2bdb19ce4956608bd50814d8291bdd677342825b6e38f9eed6fcf7037e8a 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", "tarif/piece_tarif.html.twig"));

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

        // line 1
        yield "<div class=\"d-flex customtab-periode\" id=\"tab-contrat-tarif\">
    <div class=\"col-sm-3 color-primary\" style=\"position:relative;width:20%\">
        <p class=\"mb-2\" style=\"font-size:24px\">Période</p> <a class=\"\"><i class=\"fa fa-plus add-icon\" style=\"right: 2px\"></i></a>
        <ul class=\"nav nav-tabs flex-colum column-tab\" role=\"tablist\" data-tabs=\"tabs\">
            ";
        // line 5
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(Twig\Extension\CoreExtension::keys(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 5, $this->source); })()), "datas", [], "any", false, false, false, 5), "result", [], "any", false, false, false, 5)));
        $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["periode"]) {
            // line 6
            yield "                <li class=\"nav-item px-2 w-100 d-flex\" role=\"presentation\">
                    <button class=\"nav-link ";
            // line 7
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 7), 1))) ? ("active") : (""));
            yield " w-100 text-start px-1 d-flex justify-content-between\" id=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 7), "html", null, true);
            yield "-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#tabdata-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 7), "html", null, true);
            yield "\" type=\"button\" role=\"tab\"  aria-selected=\"true\">
                        <span class=\"periode_nom\">";
            // line 8
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
            yield "</span>
                        <span class=\"icons d-flex align-items-center\">
                            <i class=\"fa fa-edit \"></i>
                            ";
            // line 11
            if (CoreExtension::inFilter($context["periode"], CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 11, $this->source); })()), "datas", [], "any", false, false, false, 11), "tabPeriode", [], "any", false, false, false, 11))) {
                yield "<i class=\"fa fa-trash \" data-periode=\"";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
                yield "\" data-type=\"contrat\"></i>";
            }
            // line 12
            yield "                        </span>
                    </button>
                </li>
            ";
            ++$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['periode'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 16
        yield "        </ul>
    </div>

    <div class=\"tab-content bg-white px-3 py-3 col-sm-9\"  style=\"max-height:calc(100vh - 142px);overflow: auto; width:80%;\">
        ";
        // line 20
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 20, $this->source); })()), "datas", [], "any", false, false, false, 20), "result", [], "any", false, false, false, 20));
        $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["data"]) {
            // line 21
            yield "            <div class=\"tab-pane fade show ";
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 21), 1))) ? ("active") : (""));
            yield "\" id=\"tabdata-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 21), "html", null, true);
            yield "\" role=\"tabpanel\" aria-labelledby=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 21), "html", null, true);
            yield "-tab\">
                <div
                        class=\"grid\"
                        data-style=\"tab\"
                        id=\"grid-tab-";
            // line 25
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 25), "html", null, true);
            yield "\"
                        style=\"height: 440px;\"
                        data-page=\"";
            // line 27
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 27, $this->source); })()), "entityName", [], "any", false, false, false, 27), "html", null, true);
            yield "\"
                        data-columns=\"";
            // line 28
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 28, $this->source); })()), "columns", [], "any", false, false, false, 28)), "html", null, true);
            yield "\"
                        data-rang_tri=\"";
            // line 29
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 29, $this->source); })()), "rang_tri", [], "any", false, false, false, 29), "html", null, true);
            yield "\"
                        data-source=\"";
            // line 30
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(json_encode($context["data"]), "html", null, true);
            yield "\"
                        data-lookup=\"";
            // line 31
            ((CoreExtension::getAttribute($this->env, $this->source, ($context["tab"] ?? null), "lookup", [], "any", true, true, false, 31)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 31, $this->source); })()), "lookup", [], "any", false, false, false, 31)), "html", null, true)) : (yield ""));
            yield "\"
                        data-oneditorpreparing=\"";
            // line 32
            ((CoreExtension::getAttribute($this->env, $this->source, ($context["tab"] ?? null), "onEditorPreparing", [], "any", true, true, false, 32)) ? (yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["tab"]) || array_key_exists("tab", $context) ? $context["tab"] : (function () { throw new RuntimeError('Variable "tab" does not exist.', 32, $this->source); })()), "onEditorPreparing", [], "any", false, false, false, 32)), "html", null, true)) : (yield ""));
            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['data'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 38
        yield "    </div>
</div>






";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  187 => 38,  167 => 32,  163 => 31,  159 => 30,  155 => 29,  151 => 28,  147 => 27,  142 => 25,  130 => 21,  113 => 20,  107 => 16,  90 => 12,  84 => 11,  78 => 8,  70 => 7,  67 => 6,  50 => 5,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("<div class=\"d-flex customtab-periode\" id=\"tab-contrat-tarif\">
    <div class=\"col-sm-3 color-primary\" style=\"position:relative;width:20%\">
        <p class=\"mb-2\" style=\"font-size:24px\">Période</p> <a class=\"\"><i class=\"fa fa-plus add-icon\" style=\"right: 2px\"></i></a>
        <ul class=\"nav nav-tabs flex-colum column-tab\" role=\"tablist\" data-tabs=\"tabs\">
            {% for periode in tab.datas.result|keys %}
                <li class=\"nav-item px-2 w-100 d-flex\" role=\"presentation\">
                    <button class=\"nav-link {{ loop.index == 1 ? 'active' : '' }} w-100 text-start px-1 d-flex justify-content-between\" id=\"{{ loop.index }}-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#tabdata-{{ loop.index }}\" type=\"button\" role=\"tab\"  aria-selected=\"true\">
                        <span class=\"periode_nom\">{{ periode}}</span>
                        <span class=\"icons d-flex align-items-center\">
                            <i class=\"fa fa-edit \"></i>
                            {% if periode in tab.datas.tabPeriode %}<i class=\"fa fa-trash \" data-periode=\"{{ periode }}\" data-type=\"contrat\"></i>{% endif %}
                        </span>
                    </button>
                </li>
            {% endfor %}
        </ul>
    </div>

    <div class=\"tab-content bg-white px-3 py-3 col-sm-9\"  style=\"max-height:calc(100vh - 142px);overflow: auto; width:80%;\">
        {% for data in tab.datas.result %}
            <div class=\"tab-pane fade show {{ loop.index == 1 ? 'active' : '' }}\" id=\"tabdata-{{ loop.index }}\" role=\"tabpanel\" aria-labelledby=\"{{ loop.index }}-tab\">
                <div
                        class=\"grid\"
                        data-style=\"tab\"
                        id=\"grid-tab-{{ loop.index }}\"
                        style=\"height: 440px;\"
                        data-page=\"{{ tab.entityName }}\"
                        data-columns=\"{{ tab.columns|json_encode() }}\"
                        data-rang_tri=\"{{ tab.rang_tri }}\"
                        data-source=\"{{ data|json_encode() }}\"
                        data-lookup=\"{{ tab.lookup is defined  ? tab.lookup|json_encode() : '' }}\"
                        data-oneditorpreparing=\"{{ tab.onEditorPreparing is defined  ? tab.onEditorPreparing|json_encode() : '' }}\"
                >

                </div>
            </div>
        {% endfor %}
    </div>
</div>






", "tarif/piece_tarif.html.twig", "/builds/dev/refonte_sav/templates/tarif/piece_tarif.html.twig");
    }
}
