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

/* intervention/bloc_documents.html.twig */
class __TwigTemplate_2370903b011050303b9c1cddbcdabeec26cfe32a343b2ef22d4080c17068ce5e 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", "intervention/bloc_documents.html.twig"));

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

        // line 2
        $context["is_readonly"] = ((array_key_exists("is_readonly", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["is_readonly"]) || array_key_exists("is_readonly", $context) ? $context["is_readonly"] : (function () { throw new RuntimeError('Variable "is_readonly" does not exist.', 2, $this->source); })()), false)) : (false));
        // line 3
        yield "
<div class=\"px-2 ";
        // line 4
        yield (((isset($context["is_readonly"]) || array_key_exists("is_readonly", $context) ? $context["is_readonly"] : (function () { throw new RuntimeError('Variable "is_readonly" does not exist.', 4, $this->source); })())) ? (" pt-1 pb-2 ") : (" py-3 "));
        yield " bg-white color-primary w-100 h-100 block-infos-container\">
    <div style=\"max-height: 108px; overflow: auto;border-bottom: 1px solid #ccc\">
        <table class=\"table table-responsive table-sm table-inverse-color-datagrid mb-0 border-grey\">
            ";
        // line 7
        if ((isset($context["is_readonly"]) || array_key_exists("is_readonly", $context) ? $context["is_readonly"] : (function () { throw new RuntimeError('Variable "is_readonly" does not exist.', 7, $this->source); })())) {
            // line 8
            yield "                <thead>
                    <th style=\"text-align: left\">Documents</th>
                </thead>
            ";
        }
        // line 12
        yield "            <tbody style=\"height: 71px\">
            ";
        // line 13
        if ((1 === CoreExtension::compare(Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["intervention"]) || array_key_exists("intervention", $context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.', 13, $this->source); })()), "interventionDocuments", [], "any", false, false, false, 13)), 0))) {
            // line 14
            yield "                ";
            $context["nb_line"] = 0;
            // line 15
            yield "                ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["intervention"]) || array_key_exists("intervention", $context) ? $context["intervention"] : (function () { throw new RuntimeError('Variable "intervention" does not exist.', 15, $this->source); })()), "interventionDocuments", [], "any", false, false, false, 15));
            foreach ($context['_seq'] as $context["_key"] => $context["InterventionDocument"]) {
                // line 16
                yield "                    ";
                $context["nb_line"] = ((isset($context["nb_line"]) || array_key_exists("nb_line", $context) ? $context["nb_line"] : (function () { throw new RuntimeError('Variable "nb_line" does not exist.', 16, $this->source); })()) + 1);
                // line 17
                yield "                    <tr style=\"height: 25px !important\">
                        <td class=\"align-middle\">";
                // line 18
                yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["InterventionDocument"], "nom", [], "any", false, false, false, 18), "html", null, true);
                yield "</td>
                        <td style=\"text-align: right\"><i class=\"fa fa-eye fa-border border-grey-medium\"></i></td>
                    </tr>
                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['InterventionDocument'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 22
            yield "                ";
            $context["emptyRows"] = (3 - (isset($context["nb_line"]) || array_key_exists("nb_line", $context) ? $context["nb_line"] : (function () { throw new RuntimeError('Variable "nb_line" does not exist.', 22, $this->source); })()));
            // line 23
            yield "                ";
            if ((1 === CoreExtension::compare((isset($context["emptyRows"]) || array_key_exists("emptyRows", $context) ? $context["emptyRows"] : (function () { throw new RuntimeError('Variable "emptyRows" does not exist.', 23, $this->source); })()), 0))) {
                // line 24
                yield "                    ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable(range(1, (isset($context["emptyRows"]) || array_key_exists("emptyRows", $context) ? $context["emptyRows"] : (function () { throw new RuntimeError('Variable "emptyRows" does not exist.', 24, $this->source); })())));
                foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
                    // line 25
                    yield "                        <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                    ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 27
                yield "                ";
            }
            // line 28
            yield "            ";
        } else {
            // line 29
            yield "                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
            ";
        }
        // line 33
        yield "            </tbody>
        </table>
    </div>
</div>
";
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  122 => 33,  116 => 29,  113 => 28,  110 => 27,  103 => 25,  98 => 24,  95 => 23,  92 => 22,  82 => 18,  79 => 17,  76 => 16,  71 => 15,  68 => 14,  66 => 13,  63 => 12,  57 => 8,  55 => 7,  49 => 4,  46 => 3,  44 => 2,);
    }

    public function getSourceContext()
    {
        return new Source("{# Détection du contexte : readonly ou validation #}
{% set is_readonly = is_readonly|default(false) %}

<div class=\"px-2 {{ is_readonly ? ' pt-1 pb-2 ' : ' py-3 ' }} bg-white color-primary w-100 h-100 block-infos-container\">
    <div style=\"max-height: 108px; overflow: auto;border-bottom: 1px solid #ccc\">
        <table class=\"table table-responsive table-sm table-inverse-color-datagrid mb-0 border-grey\">
            {% if is_readonly %}
                <thead>
                    <th style=\"text-align: left\">Documents</th>
                </thead>
            {% endif %}
            <tbody style=\"height: 71px\">
            {% if intervention.interventionDocuments|length > 0 %}
                {% set nb_line = 0 %}
                {% for InterventionDocument in intervention.interventionDocuments %}
                    {% set nb_line = nb_line + 1 %}
                    <tr style=\"height: 25px !important\">
                        <td class=\"align-middle\">{{ InterventionDocument.nom }}</td>
                        <td style=\"text-align: right\"><i class=\"fa fa-eye fa-border border-grey-medium\"></i></td>
                    </tr>
                {% endfor %}
                {% set emptyRows = 3 - nb_line %}
                {% if emptyRows > 0 %}
                    {% for i in 1..emptyRows %}
                        <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                    {% endfor %}
                {% endif %}
            {% else %}
                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
                <tr style=\"height: 25px\"><td colspan=\"2\"></td></tr>
            {% endif %}
            </tbody>
        </table>
    </div>
</div>
", "intervention/bloc_documents.html.twig", "/builds/dev/refonte_sav/templates/intervention/bloc_documents.html.twig");
    }
}
