<?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/prestation_tarif.html.twig */
class __TwigTemplate_b39b9c570f409b39da8d99cf244b63df2c57208157201844a995c71530f8fb5c 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/prestation_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/prestation_tarif.html.twig"));

        // line 1
        $context["type"] = "prestation";
        // line 2
        yield "<div class=\"d-flex customtab-periode\" id=\"tab-prestation-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=\"\" data-popup-id=\"popup-add-periode-pres\" data-dxpopup=\"\" data-popup-title=\"Ajouter une période tarifaire\" data-popup-width=\"auto\"><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 7
        $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.', 7, $this->source); })()), "datas", [], "any", false, false, false, 7), "result", [], "any", false, false, false, 7)));
        $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 8
            yield "                <li class=\"nav-item px-2 w-100 d-flex\" role=\"presentation\">
                    <button class=\"nav-link ";
            // line 9
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 9), 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, 9), "html", null, true);
            yield "-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#tabdataprestation-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 9), "html", null, true);
            yield "\" type=\"button\" role=\"tab\"  aria-selected=\"true\">
                        <span class=\"periode_nom\">";
            // line 10
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
            yield "</span>
                        <span class=\"icons d-flex align-items-center\">
                            ";
            // line 12
            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.', 12, $this->source); })()), "datas", [], "any", false, false, false, 12), "tabPeriode", [], "any", false, false, false, 12))) {
                // line 13
                yield "                                <a data-popup-id=\"popup-prestation-tarif-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 13), "html", null, true);
                yield "\" data-dxpopup=\"\" data-popup-title=\"Modifier une période tarifaire\" data-popup-width=\"auto\"><i class=\"fa fa-edit \"></i></a>
                                <a><i class=\"fa fa-trash \" data-periode=\"";
                // line 14
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
                yield "\" data-type=\"prestation\"></i></a>
                            ";
            }
            // line 16
            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 20
        yield "        </ul>
    </div>

    <div class=\"tab-content bg-white px-3 py-3 col-sm-9\" style=\"width:80%;\">
        ";
        // line 24
        $context["path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("update_tarif_periode_type", ["type" => (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 24, $this->source); })())]);
        // line 25
        yield "        ";
        $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.', 25, $this->source); })()), "datas", [], "any", false, false, false, 25), "result", [], "any", false, false, false, 25));
        $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["keyPeriode"] => $context["data"]) {
            // line 26
            yield "            <div class=\"tab-pane fade show ";
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 26), 1))) ? ("active") : (""));
            yield "\" id=\"tabdataprestation-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 26), "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, 26), "html", null, true);
            yield "-tab\">
                ";
            // line 27
            $context["action"] = "show";
            // line 28
            yield "                ";
            yield Twig\Extension\CoreExtension::include($this->env, $context, "tarif/_table_prestation_tarif.html.twig");
            yield "
            </div>
            ";
            // line 30
            $context["tabPeriode"] = Twig\Extension\CoreExtension::split($this->env->getCharset(), $context["keyPeriode"], "/");
            // line 31
            yield "            ";
            $context["periode"] = ((((CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 31, $this->source); })()), 2, [], "array", false, false, false, 31) . "-") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 31, $this->source); })()), 1, [], "array", false, false, false, 31)) . "-") . CoreExtension::getAttribute($this->env, $this->source, (isset($context["tabPeriode"]) || array_key_exists("tabPeriode", $context) ? $context["tabPeriode"] : (function () { throw new RuntimeError('Variable "tabPeriode" does not exist.', 31, $this->source); })()), 0, [], "array", false, false, false, 31));
            // line 32
            yield "            ";
            $context["action"] = "update";
            // line 33
            yield "            ";
            $context["id"] = ("popup-prestation-tarif-" . CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 33));
            // line 34
            yield "            ";
            yield Twig\Extension\CoreExtension::include($this->env, $context, "tarif/_popup_prestation_tarif.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['keyPeriode'], $context['data'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 36
        yield "    </div>
</div>

";
        // line 39
        $context["id"] = "popup-add-periode-pres";
        // line 40
        $context["path"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("add_tarif_periode_type", ["type" => (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 40, $this->source); })())]);
        // line 41
        $context["action"] = "add";
        // line 42
        yield Twig\Extension\CoreExtension::include($this->env, $context, "tarif/_popup_prestation_tarif.html.twig");
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  197 => 42,  195 => 41,  193 => 40,  191 => 39,  186 => 36,  169 => 34,  166 => 33,  163 => 32,  160 => 31,  158 => 30,  152 => 28,  150 => 27,  141 => 26,  123 => 25,  121 => 24,  115 => 20,  98 => 16,  93 => 14,  88 => 13,  86 => 12,  81 => 10,  73 => 9,  70 => 8,  53 => 7,  46 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% set type = 'prestation' %}
<div class=\"d-flex customtab-periode\" id=\"tab-prestation-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=\"\" data-popup-id=\"popup-add-periode-pres\" data-dxpopup=\"\" data-popup-title=\"Ajouter une période tarifaire\" data-popup-width=\"auto\"><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=\"#tabdataprestation-{{ loop.index }}\" type=\"button\" role=\"tab\"  aria-selected=\"true\">
                        <span class=\"periode_nom\">{{ periode}}</span>
                        <span class=\"icons d-flex align-items-center\">
                            {% if periode in tab.datas.tabPeriode %}
                                <a data-popup-id=\"popup-prestation-tarif-{{ loop.index }}\" data-dxpopup=\"\" data-popup-title=\"Modifier une période tarifaire\" data-popup-width=\"auto\"><i class=\"fa fa-edit \"></i></a>
                                <a><i class=\"fa fa-trash \" data-periode=\"{{ periode }}\" data-type=\"prestation\"></i></a>
                            {% endif %}
                        </span>
                    </button>
                </li>
            {% endfor %}
        </ul>
    </div>

    <div class=\"tab-content bg-white px-3 py-3 col-sm-9\" style=\"width:80%;\">
        {% set path = path('update_tarif_periode_type', {type: type})  %}
        {% for keyPeriode, data in tab.datas.result %}
            <div class=\"tab-pane fade show {{ loop.index == 1 ? 'active' : '' }}\" id=\"tabdataprestation-{{ loop.index }}\" role=\"tabpanel\" aria-labelledby=\"{{ loop.index }}-tab\">
                {% set action = 'show' %}
                {{ include('tarif/_table_prestation_tarif.html.twig') }}
            </div>
            {% set tabPeriode = keyPeriode|split('/')%}
            {% set periode = tabPeriode[2] ~ '-' ~ tabPeriode[1] ~ '-' ~ tabPeriode[0] %}
            {% set action = 'update' %}
            {% set id = 'popup-prestation-tarif-' ~ loop.index %}
            {{ include('tarif/_popup_prestation_tarif.html.twig') }}
        {% endfor %}
    </div>
</div>

{% set id = 'popup-add-periode-pres' %}
{% set path = path('add_tarif_periode_type', {type: type})  %}
{% set action = 'add' %}
{{ include('tarif/_popup_prestation_tarif.html.twig') }}", "tarif/prestation_tarif.html.twig", "/builds/dev/refonte_sav/templates/tarif/prestation_tarif.html.twig");
    }
}
