<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* invoice/document_upload.html.twig */
class __TwigTemplate_e8f0991d45b58d67fbee4f3646b7c62904400606cf221daa589061d0d5a4facf extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_actions' => [$this, 'block_page_actions'],
            'main' => [$this, 'block_main'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return $this->loadTemplate(((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 1), "xmlHttpRequest", [], "any", false, false, false, 1)) ? ("form.html.twig") : ("base.html.twig")), "invoice/document_upload.html.twig", 1);
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("invoice/actions.html.twig", "invoice/document_upload.html.twig", 2)->unwrap();
        // line 1
        $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
    }

    // line 4
    public function block_page_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("admin_invoice_template.title"), "html", null, true);
    }

    // line 5
    public function block_page_actions($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_call_macro($macros["actions"], "macro_invoice_upload", ["index"], 5, $context, $this->getSourceContext());
    }

    // line 7
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 8
        echo "    ";
        if ( !(null === ($context["form"] ?? null))) {
            // line 9
            echo "        ";
            $this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme(($context["form"] ?? null), [0 => "@AdminLTE/layout/form-theme-horizontal.html.twig"], true);
            // line 10
            echo "        ";
            $context["formEditTemplate"] = ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "request", [], "any", false, false, false, 10), "xmlHttpRequest", [], "any", false, false, false, 10)) ? ("default/_form_modal.html.twig") : ("default/_form.html.twig"));
            // line 11
            echo "        ";
            $context["formOptions"] = ["title" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("upload"), "form" =>             // line 13
($context["form"] ?? null), "back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template")];
            // line 16
            echo "
        ";
            // line 17
            $this->loadTemplate("invoice/document_upload.html.twig", "invoice/document_upload.html.twig", 17, "372137162")->display(twig_array_merge($context, ($context["formOptions"] ?? null)));
            // line 23
            echo "    ";
        }
        // line 24
        echo "
    ";
        // line 25
        if (1 === twig_compare(twig_length_filter($this->env, ($context["documents"] ?? null)), 0)) {
            // line 26
            echo "        ";
            $this->loadTemplate("invoice/document_upload.html.twig", "invoice/document_upload.html.twig", 26, "1194696695")->display(twig_array_merge($context, ["documents" => ($context["documents"] ?? null)]));
            // line 48
            echo "    ";
        }
    }

    public function getTemplateName()
    {
        return "invoice/document_upload.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  97 => 48,  94 => 26,  92 => 25,  89 => 24,  86 => 23,  84 => 17,  81 => 16,  79 => 13,  77 => 11,  74 => 10,  71 => 9,  68 => 8,  64 => 7,  57 => 5,  50 => 4,  46 => 1,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "invoice/document_upload.html.twig", "/var/www/html/kimai2/templates/invoice/document_upload.html.twig");
    }
}


/* invoice/document_upload.html.twig */
class __TwigTemplate_e8f0991d45b58d67fbee4f3646b7c62904400606cf221daa589061d0d5a4facf___372137162 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'form_body' => [$this, 'block_form_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 17
        return $this->loadTemplate(($context["formEditTemplate"] ?? null), "invoice/document_upload.html.twig", 17);
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
    }

    // line 18
    public function block_form_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 19
        echo "                ";
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "document", [], "any", false, false, false, 19), 'row');
        echo "
                ";
        // line 20
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
        echo "
            ";
    }

    public function getTemplateName()
    {
        return "invoice/document_upload.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  162 => 20,  157 => 19,  153 => 18,  143 => 17,  97 => 48,  94 => 26,  92 => 25,  89 => 24,  86 => 23,  84 => 17,  81 => 16,  79 => 13,  77 => 11,  74 => 10,  71 => 9,  68 => 8,  64 => 7,  57 => 5,  50 => 4,  46 => 1,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "invoice/document_upload.html.twig", "/var/www/html/kimai2/templates/invoice/document_upload.html.twig");
    }
}


/* invoice/document_upload.html.twig */
class __TwigTemplate_e8f0991d45b58d67fbee4f3646b7c62904400606cf221daa589061d0d5a4facf___1194696695 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'box_title' => [$this, 'block_box_title'],
            'box_attributes' => [$this, 'block_box_attributes'],
            'box_body_class' => [$this, 'block_box_body_class'],
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 26
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 27
        $macros["actions"] = $this->macros["actions"] = $this->loadTemplate("project/actions.html.twig", "invoice/document_upload.html.twig", 27)->unwrap();
        // line 28
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/document_upload.html.twig", 28)->unwrap();
        // line 26
        $this->parent = $this->loadTemplate("@AdminLTE/Widgets/box-widget.html.twig", "invoice/document_upload.html.twig", 26);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 29
    public function block_box_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.invoice_renderer", [], "invoice-renderer"), "html", null, true);
    }

    // line 30
    public function block_box_attributes($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 31
        echo "                id=\"invoice_document_list\"
            ";
    }

    // line 33
    public function block_box_body_class($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "no-padding";
    }

    // line 34
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 35
        echo "                <table class=\"table table-hover dataTable\">
                    <tbody>
                    ";
        // line 37
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["documents"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["document"]) {
            // line 38
            echo "                        <tr>
                            <td style=\"width: 33%\">";
            // line 39
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["document"], "id", [], "any", false, false, false, 39), "html", null, true);
            echo "</td>
                            <td style=\"width: 33%\">";
            // line 40
            echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["document"], "lastChange", [], "any", false, false, false, 40)), "html", null, true);
            echo "</td>
                            <td>";
            // line 41
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["document"], "name", [], "any", false, false, false, 41), "html", null, true);
            echo "</td>
                        </tr>
                    ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['document'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 44
        echo "                    </tbody>
                </table>
            ";
    }

    public function getTemplateName()
    {
        return "invoice/document_upload.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  283 => 44,  274 => 41,  270 => 40,  266 => 39,  263 => 38,  259 => 37,  255 => 35,  251 => 34,  244 => 33,  239 => 31,  235 => 30,  228 => 29,  223 => 26,  221 => 28,  219 => 27,  212 => 26,  162 => 20,  157 => 19,  153 => 18,  143 => 17,  97 => 48,  94 => 26,  92 => 25,  89 => 24,  86 => 23,  84 => 17,  81 => 16,  79 => 13,  77 => 11,  74 => 10,  71 => 9,  68 => 8,  64 => 7,  57 => 5,  50 => 4,  46 => 1,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "invoice/document_upload.html.twig", "/var/www/html/kimai2/templates/invoice/document_upload.html.twig");
    }
}
