<?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/macros.html.twig */
class __TwigTemplate_40e13727406229f6367c096ada526a691b72e6aecb722f5a72f4b9c049d9b559 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;
        // line 1
        echo "
";
        // line 17
        echo "
";
    }

    // line 2
    public function macro_invoice_status($__invoice__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "invoice" => $__invoice__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 3
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/macros.html.twig", 3)->unwrap();
            // line 4
            echo "    ";
            $context["overdue"] = twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "overdue", [], "any", false, false, false, 4);
            // line 5
            echo "    ";
            if ((twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "new", [], "any", false, false, false, 5) && ($context["overdue"] ?? null))) {
                // line 6
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("status.new"), "danger"], 6, $context, $this->getSourceContext());
                echo "
    ";
            } elseif (twig_get_attribute($this->env, $this->source,             // line 7
($context["invoice"] ?? null), "new", [], "any", false, false, false, 7)) {
                // line 8
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("status.new"), "primary"], 8, $context, $this->getSourceContext());
                echo "
    ";
            } elseif ((twig_get_attribute($this->env, $this->source,             // line 9
($context["invoice"] ?? null), "pending", [], "any", false, false, false, 9) && ($context["overdue"] ?? null))) {
                // line 10
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("status.pending"), "danger"], 10, $context, $this->getSourceContext());
                echo "
    ";
            } elseif (twig_get_attribute($this->env, $this->source,             // line 11
($context["invoice"] ?? null), "pending", [], "any", false, false, false, 11)) {
                // line 12
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("status.pending"), "warning"], 12, $context, $this->getSourceContext());
                echo "
    ";
            } elseif (twig_get_attribute($this->env, $this->source,             // line 13
($context["invoice"] ?? null), "paid", [], "any", false, false, false, 13)) {
                // line 14
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("status.paid"), "success"], 14, $context, $this->getSourceContext());
                echo "
    ";
            }

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

    // line 18
    public function macro_invoice_due_date($__invoice__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "invoice" => $__invoice__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 19
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/macros.html.twig", 19)->unwrap();
            // line 20
            echo "    ";
            if ((twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "overdue", [], "any", false, false, false, 20) &&  !twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "paid", [], "any", false, false, false, 20))) {
                // line 21
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "dueDate", [], "any", false, false, false, 21)), "danger"], 21, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 23
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_label", [$this->extensions['App\Twig\DateExtensions']->dateShort(twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "dueDate", [], "any", false, false, false, 23)), "primary"], 23, $context, $this->getSourceContext());
                echo "
    ";
            }

            return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
        } finally {
            ob_end_clean();
        }
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  133 => 23,  127 => 21,  124 => 20,  121 => 19,  108 => 18,  95 => 14,  93 => 13,  88 => 12,  86 => 11,  81 => 10,  79 => 9,  74 => 8,  72 => 7,  67 => 6,  64 => 5,  61 => 4,  58 => 3,  45 => 2,  40 => 17,  37 => 1,);
    }

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