<?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/option_tarif.html.twig */
class __TwigTemplate_7d9588fb4020004b353a6622fda296d81f00bc3d8dbfd460804fe3a8435363bc 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/option_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/option_tarif.html.twig"));

        // line 1
        $context["type"] = "option";
        // line 2
        yield "<div class=\"d-flex customtab-periode\" id=\"tab-option-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-";
        // line 4
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 4, $this->source); })()), "html", null, true);
        yield "\" 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 6
        $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.', 6, $this->source); })()), "datas", [], "any", false, false, false, 6), "result", [], "any", false, false, false, 6)));
        $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 7
            yield "                <li class=\"nav-item px-2 w-100 d-flex\" role=\"presentation\">
                    <button class=\"nav-link ";
            // line 8
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 8), 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, 8), "html", null, true);
            yield "-tab\" data-bs-toggle=\"tab\" data-bs-target=\"#tabdata-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 8, $this->source); })()), "html", null, true);
            yield "-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 8), "html", null, true);
            yield "\" type=\"button\" role=\"tab\"  aria-selected=\"true\">
                        <span class=\"periode_nom\">";
            // line 9
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
            yield "</span>
                        <span class=\"icons d-flex align-items-center\">
                            ";
            // 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))) {
                // line 12
                yield "                             <a data-popup-id=\"popup-update-periode-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 12, $this->source); })()), "html", null, true);
                yield "-";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 12), "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 13
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["periode"], "html", null, true);
                yield "\" data-type=\"option\"></i></a>
                            ";
            }
            // line 15
            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 19
        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 23
        $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.', 23, $this->source); })()), "datas", [], "any", false, false, false, 23), "result", [], "any", false, false, false, 23));
        $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 24
            yield "            <div class=\"tab-pane fade show ";
            yield (((0 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 24), 1))) ? ("active") : (""));
            yield "\" id=\"tabdata-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 24, $this->source); })()), "html", null, true);
            yield "-";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 24), "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, 24), "html", null, true);
            yield "-tab\" style=\"padding-right:59px !important;position:relative\">
                <table class=\"table table-responsive table-bordered table-striped table-sm\" >
                    <thead  align=\"center\" style=\"vertical-align: middle!important;\">
                        <th>Option</th>
                        <th>Type</th>
                        <th>Tarif HT MOD</th>
                        <th>Tarif HT GT<br/>3-5 ans</th>
                        <th>Tarif HT GT<br/>6-20 ans</th>
                        <th class=\"bg-grey-dark\">Tarif HT MOD 2</th>
                        <th class=\"bg-grey-dark\">Tarif HT GT 2<br/>3-5 ans</th>
                        <th class=\"bg-grey-dark\">Tarif HT GT 2<br/>6-20 ans</th>
                    </thead>
                    <tr>
                        ";
            // line 37
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable($context["data"]);
            foreach ($context['_seq'] as $context["optionName"] => $context["types"]) {
                // line 38
                yield "                            <tr>
                            <td rowspan=\"";
                // line 39
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::length($this->env->getCharset(), $context["types"]), "html", null, true);
                yield "\" class=\"bg-primary\" valign=\"middle\" align=\"center\">";
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["optionName"], "html", null, true);
                yield "</td>
                            ";
                // line 40
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable($context["types"]);
                $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["typeName"] => $context["tarif"]) {
                    // line 41
                    yield "                                ";
                    if ((1 === CoreExtension::compare(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 41), 1))) {
                        // line 42
                        yield "                                <tr>
                                ";
                    }
                    // line 44
                    yield "                                <td align=\"center\">";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["typeName"], "html", null, true);
                    yield "</td>
                                <td align=\"right\">";
                    // line 45
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "MOD 1", [], "array", false, false, false, 45), "tarif", [], "array", false, false, false, 45), "html", null, true);
                    yield "</td>
                                <td align=\"right\">";
                    // line 46
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "GT 1 <br/> 3-5 ans", [], "array", false, false, false, 46), "tarif", [], "array", false, false, false, 46), "html", null, true);
                    yield "</td>
                                <td align=\"right\">";
                    // line 47
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "GT 1 <br/> 6-20 ans", [], "array", false, false, false, 47), "tarif", [], "array", false, false, false, 47), "html", null, true);
                    yield "</td>
                                <td align=\"right\" class=\"bg-grey-medium\" disabled=\"disabled\">";
                    // line 48
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "MOD 2", [], "array", false, false, false, 48), "tarif", [], "array", false, false, false, 48), "html", null, true);
                    yield "</td>
                                <td align=\"right\" class=\"bg-grey-medium\">";
                    // line 49
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "GT 2 <br/> 3-5 ans", [], "array", false, false, false, 49), "tarif", [], "array", false, false, false, 49), "html", null, true);
                    yield "</td>
                                <td align=\"right\" class=\"bg-grey-medium\">";
                    // line 50
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["tarif"], "GT 2 <br/> 6-20 ans", [], "array", false, false, false, 50), "tarif", [], "array", false, false, false, 50), "html", null, true);
                    yield "</td>
                                </tr>
                            ";
                    ++$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['typeName'], $context['tarif'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 53
                yield "                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['optionName'], $context['types'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 54
            yield "                    </tbody>
                </table>
                <a style=\"position: absolute;top:0px;right:0;\" target=\"_blank\" href=\"";
            // line 56
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("export_tarif_periode_type", ["type" => (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 56, $this->source); })()), "periode" => $context["keyperiode"]]), "html", null, true);
            yield "\"><i class=\"fa fa-download color-primary\" style=\"font-size:2.5em;margin-right:0;\"></i></a>
            </div>
            ";
            // line 58
            yield Twig\Extension\CoreExtension::include($this->env, $context, "tarif/_popup_update_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 60
        yield "    </div>
</div>
";
        // line 62
        yield Twig\Extension\CoreExtension::include($this->env, $context, "tarif/_popup_add_periode.html.twig");
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  281 => 62,  277 => 60,  261 => 58,  256 => 56,  252 => 54,  246 => 53,  229 => 50,  225 => 49,  221 => 48,  217 => 47,  213 => 46,  209 => 45,  204 => 44,  200 => 42,  197 => 41,  180 => 40,  174 => 39,  171 => 38,  167 => 37,  144 => 24,  127 => 23,  121 => 19,  104 => 15,  99 => 13,  92 => 12,  90 => 11,  85 => 9,  75 => 8,  72 => 7,  55 => 6,  50 => 4,  46 => 2,  44 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% set type = 'option' %}
<div class=\"d-flex customtab-periode\" id=\"tab-option-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-{{ type }}\" 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=\"#tabdata-{{ type}}-{{ 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-update-periode-{{ type }}-{{ 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=\"option\"></i></a>
                            {% 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 keyperiode, data in tab.datas.result %}
            <div class=\"tab-pane fade show {{ loop.index == 1 ? 'active' : '' }}\" id=\"tabdata-{{ type }}-{{ loop.index }}\" role=\"tabpanel\" aria-labelledby=\"{{ loop.index }}-tab\" style=\"padding-right:59px !important;position:relative\">
                <table class=\"table table-responsive table-bordered table-striped table-sm\" >
                    <thead  align=\"center\" style=\"vertical-align: middle!important;\">
                        <th>Option</th>
                        <th>Type</th>
                        <th>Tarif HT MOD</th>
                        <th>Tarif HT GT<br/>3-5 ans</th>
                        <th>Tarif HT GT<br/>6-20 ans</th>
                        <th class=\"bg-grey-dark\">Tarif HT MOD 2</th>
                        <th class=\"bg-grey-dark\">Tarif HT GT 2<br/>3-5 ans</th>
                        <th class=\"bg-grey-dark\">Tarif HT GT 2<br/>6-20 ans</th>
                    </thead>
                    <tr>
                        {% for optionName,types in data %}
                            <tr>
                            <td rowspan=\"{{ types|length }}\" class=\"bg-primary\" valign=\"middle\" align=\"center\">{{ optionName }}</td>
                            {% for typeName, tarif in types %}
                                {% if loop.index > 1 %}
                                <tr>
                                {% endif %}
                                <td align=\"center\">{{ typeName }}</td>
                                <td align=\"right\">{{ tarif['MOD 1']['tarif'] }}</td>
                                <td align=\"right\">{{ tarif['GT 1 <br/> 3-5 ans']['tarif'] }}</td>
                                <td align=\"right\">{{ tarif['GT 1 <br/> 6-20 ans']['tarif'] }}</td>
                                <td align=\"right\" class=\"bg-grey-medium\" disabled=\"disabled\">{{ tarif['MOD 2']['tarif'] }}</td>
                                <td align=\"right\" class=\"bg-grey-medium\">{{ tarif['GT 2 <br/> 3-5 ans']['tarif'] }}</td>
                                <td align=\"right\" class=\"bg-grey-medium\">{{ tarif['GT 2 <br/> 6-20 ans']['tarif'] }}</td>
                                </tr>
                            {% endfor %}
                        {% endfor %}
                    </tbody>
                </table>
                <a style=\"position: absolute;top:0px;right:0;\" target=\"_blank\" href=\"{{ path('export_tarif_periode_type', {type:type,periode: keyperiode}) }}\"><i class=\"fa fa-download color-primary\" style=\"font-size:2.5em;margin-right:0;\"></i></a>
            </div>
            {{ include('tarif/_popup_update_tarif.html.twig') }}
        {% endfor %}
    </div>
</div>
{{ include('tarif/_popup_add_periode.html.twig') }}", "tarif/option_tarif.html.twig", "/builds/dev/refonte_sav/templates/tarif/option_tarif.html.twig");
    }
}
