<?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/actions.html.twig */
class __TwigTemplate_9fc19110c04ec138f8a3a2175c5e13ff82b1b4a6bf5d07a27b4b53cb75f49497 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 24
        echo "
";
        // line 49
        echo "
";
        // line 77
        echo "
";
        // line 94
        echo "
";
        // line 108
        echo "
";
    }

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

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 3
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 3)->unwrap();
            // line 4
            echo "
    ";
            // line 5
            $context["actions"] = ["visibility" => "#modal_invoice"];
            // line 6
            echo "
    ";
            // line 7
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("history_invoice")) {
                // line 8
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["list" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_list")]);
                // line 9
                echo "    ";
            }
            // line 10
            echo "
    ";
            // line 11
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_invoice_template")) {
                // line 12
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["invoice-template" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template")]);
                // line 13
                echo "    ";
            }
            // line 14
            echo "
    ";
            // line 15
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("system_configuration")) {
                // line 16
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["settings" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("system_configuration_section", ["section" => "invoice"]), "class" => "modal-ajax-form"]]);
                // line 17
                echo "    ";
            }
            // line 18
            echo "
    ";
            // line 19
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("invoices.html"), "target" => "_blank"]]);
            // line 20
            echo "
    ";
            // line 21
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoices", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 22
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 22), "actions", [], "any", false, false, false, 22)], 22, $context, $this->getSourceContext());
            echo "
";

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

    // line 25
    public function macro_invoice_templates($__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 26
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 26)->unwrap();
            // line 27
            echo "
    ";
            // line 28
            $context["actions"] = [];
            // line 29
            echo "    ";
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_invoice")) {
                // line 30
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("invoice")]);
                // line 31
                echo "    ";
            }
            // line 32
            echo "
    ";
            // line 33
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["visibility" => "#modal_invoice_template"]);
            // line 34
            echo "
    ";
            // line 35
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_invoice_template")) {
                // line 36
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template_create"), "class" => "modal-ajax-form"]]);
                // line 37
                echo "    ";
            }
            // line 38
            echo "
    ";
            // line 39
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("upload_invoice_template")) {
                // line 40
                echo "        ";
                // line 41
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["upload" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_document_upload")]]);
                // line 42
                echo "    ";
            }
            // line 43
            echo "
    ";
            // line 44
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("invoices.html"), "target" => "_blank"]]);
            // line 45
            echo "
    ";
            // line 46
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoice_templates", ["actions" => ($context["actions"] ?? null), "view" => "index"]);
            // line 47
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [($context["actions"] ?? null)], 47, $context, $this->getSourceContext());
            echo "
";

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

    // line 50
    public function macro_invoice($__invoice__ = null, $__view__ = null, $__options__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "invoice" => $__invoice__,
            "view" => $__view__,
            "options" => $__options__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 51
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 51)->unwrap();
            // line 52
            echo "
    ";
            // line 53
            $context["actions"] = [];
            // line 54
            echo "
    ";
            // line 55
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("history_invoice")) {
                // line 56
                echo "        ";
                if (twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "new", [], "any", false, false, false, 56)) {
                    // line 57
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["invoice.pending" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_status", ["id" => twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "id", [], "any", false, false, false, 57), "status" => "pending"])]);
                    // line 58
                    echo "        ";
                } elseif (twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "pending", [], "any", false, false, false, 58)) {
                    // line 59
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["invoice.paid" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_status", ["id" => twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "id", [], "any", false, false, false, 59), "status" => "paid"])]);
                    // line 60
                    echo "        ";
                }
                // line 61
                echo "
        ";
                // line 62
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_download", ["id" => twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "id", [], "any", false, false, false, 62)]), "target" => "_blank"]]);
                // line 63
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_delete", ["id" => twig_get_attribute($this->env, $this->source, ($context["invoice"] ?? null), "id", [], "any", false, false, false, 63)]), "class" => "confirmation-link", "attr" => ["data-question" => "confirm.delete"]]]);
                // line 64
                echo "    ";
            }
            // line 65
            echo "
    ";
            // line 66
            if (twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", true, true, false, 66)) {
                // line 67
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", false, false, false, 67)]);
                // line 68
                echo "    ";
            }
            // line 69
            echo "
    ";
            // line 70
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoice", ["actions" => ($context["actions"] ?? null), "invoice" => ($context["invoice"] ?? null)]);
            // line 71
            echo "    ";
            if ((0 === twig_compare(($context["view"] ?? null), "index") || 0 === twig_compare(($context["view"] ?? null), "custom"))) {
                // line 72
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_table_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 72), "actions", [], "any", false, false, false, 72)], 72, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 74
                echo "        ";
                echo twig_call_macro($macros["widgets"], "macro_entity_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 74), "actions", [], "any", false, false, false, 74)], 74, $context, $this->getSourceContext());
                echo "
    ";
            }

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

    // line 78
    public function macro_invoice_listing($__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 79
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 79)->unwrap();
            // line 80
            echo "
    ";
            // line 81
            $context["actions"] = [];
            // line 82
            echo "
    ";
            // line 83
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_invoice")) {
                // line 84
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("invoice")]);
                // line 85
                echo "    ";
            }
            // line 86
            echo "
    ";
            // line 87
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["visibility" => "#modal_invoices"]);
            // line 88
            echo "
    ";
            // line 89
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("invoices.html"), "target" => "_blank"]]);
            // line 90
            echo "
    ";
            // line 91
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoice_details", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 92
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [($context["actions"] ?? null)], 92, $context, $this->getSourceContext());
            echo "
";

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

    // line 95
    public function macro_invoice_upload($__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 96
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 96)->unwrap();
            // line 97
            echo "
    ";
            // line 98
            $context["actions"] = [];
            // line 99
            echo "    ";
            if ((0 === twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_invoice_template"))) {
                // line 100
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template")]);
                // line 101
                echo "    ";
            }
            // line 102
            echo "
    ";
            // line 103
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("invoices.html"), "target" => "_blank"]]);
            // line 104
            echo "
    ";
            // line 105
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoice_upload", ["actions" => ($context["actions"] ?? null), "view" => "index"]);
            // line 106
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_page_actions", [($context["actions"] ?? null)], 106, $context, $this->getSourceContext());
            echo "
";

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

    // line 109
    public function macro_invoice_template($__template__ = null, $__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "template" => $__template__,
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 110
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "invoice/actions.html.twig", 110)->unwrap();
            // line 111
            echo "
    ";
            // line 112
            $context["actions"] = [];
            // line 113
            echo "    
    ";
            // line 114
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_invoice_template")) {
                // line 115
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["template"] ?? null), "id", [], "any", false, false, false, 115)]), "class" => "modal-ajax-form"]]);
                // line 116
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["copy" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template_copy", ["id" => twig_get_attribute($this->env, $this->source, ($context["template"] ?? null), "id", [], "any", false, false, false, 116)])]);
                // line 117
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_invoice_template_delete", ["id" => twig_get_attribute($this->env, $this->source, ($context["template"] ?? null), "id", [], "any", false, false, false, 117)]), "class" => "confirmation-link", "attr" => ["data-question" => "confirm.delete"]]]);
                // line 118
                echo "    ";
            }
            // line 119
            echo "
    ";
            // line 120
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.invoice_template", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "template" => ($context["template"] ?? null)]);
            // line 121
            echo "    ";
            echo twig_call_macro($macros["widgets"], "macro_table_actions", [twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["event"] ?? null), "payload", [], "any", false, false, false, 121), "actions", [], "any", false, false, false, 121)], 121, $context, $this->getSourceContext());
            echo "
";

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  461 => 121,  459 => 120,  456 => 119,  453 => 118,  450 => 117,  447 => 116,  444 => 115,  442 => 114,  439 => 113,  437 => 112,  434 => 111,  431 => 110,  417 => 109,  405 => 106,  403 => 105,  400 => 104,  398 => 103,  395 => 102,  392 => 101,  389 => 100,  386 => 99,  384 => 98,  381 => 97,  378 => 96,  365 => 95,  353 => 92,  351 => 91,  348 => 90,  346 => 89,  343 => 88,  341 => 87,  338 => 86,  335 => 85,  332 => 84,  330 => 83,  327 => 82,  325 => 81,  322 => 80,  319 => 79,  306 => 78,  293 => 74,  287 => 72,  284 => 71,  282 => 70,  279 => 69,  276 => 68,  273 => 67,  271 => 66,  268 => 65,  265 => 64,  262 => 63,  260 => 62,  257 => 61,  254 => 60,  251 => 59,  248 => 58,  245 => 57,  242 => 56,  240 => 55,  237 => 54,  235 => 53,  232 => 52,  229 => 51,  214 => 50,  202 => 47,  200 => 46,  197 => 45,  195 => 44,  192 => 43,  189 => 42,  186 => 41,  184 => 40,  182 => 39,  179 => 38,  176 => 37,  173 => 36,  171 => 35,  168 => 34,  166 => 33,  163 => 32,  160 => 31,  157 => 30,  154 => 29,  152 => 28,  149 => 27,  146 => 26,  133 => 25,  121 => 22,  119 => 21,  116 => 20,  114 => 19,  111 => 18,  108 => 17,  105 => 16,  103 => 15,  100 => 14,  97 => 13,  94 => 12,  92 => 11,  89 => 10,  86 => 9,  83 => 8,  81 => 7,  78 => 6,  76 => 5,  73 => 4,  70 => 3,  57 => 2,  52 => 108,  49 => 94,  46 => 77,  43 => 49,  40 => 24,  37 => 1,);
    }

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