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

/* tags/actions.html.twig */
class __TwigTemplate_158cf707426173bd5a7a8c76839e5b8034a2dfd3e90be98baff53f2f583ec134 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 15
        echo "
";
    }

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

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 2
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "tags/actions.html.twig", 2)->unwrap();
            // line 3
            echo "
    ";
            // line 4
            $context["actions"] = ["search" => ["class" => "search-toggle visible-xs-inline"]];
            // line 5
            echo "
    ";
            // line 6
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_tag")) {
                // line 7
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tags_create"), "class" => "modal-ajax-form"]]);
                // line 8
                echo "    ";
            }
            // line 9
            echo "
    ";
            // line 10
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("tags.html"), "target" => "_blank"]]);
            // line 11
            echo "
    ";
            // line 12
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.tags", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 13
            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, 13), "actions", [], "any", false, false, false, 13)], 13, $context, $this->getSourceContext());
            echo "
";

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

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

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 17
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "tags/actions.html.twig", 17)->unwrap();
            // line 18
            echo "
    ";
            // line 19
            $context["actions"] = [];
            // line 20
            echo "
    ";
            // line 21
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["tag"] ?? null), "id", [], "any", false, false, false, 21))) {
                // line 22
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("manage_tag")) {
                    // line 23
                    echo "            ";
                    $context["class"] = "";
                    // line 24
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "edit")) {
                        // line 25
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 26
                        echo "            ";
                    }
                    // line 27
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tags_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["tag"] ?? null), "id", [], "any", false, false, false, 27)]), "class" => ($context["class"] ?? null)]]);
                    // line 28
                    echo "        ";
                }
                // line 29
                echo "
        ";
                // line 30
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_other_timesheet")) {
                    // line 31
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["timesheet" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet", ["tags" => twig_get_attribute($this->env, $this->source, ($context["tag"] ?? null), "name", [], "any", false, false, false, 31)])]);
                    // line 32
                    echo "        ";
                }
                // line 33
                echo "    
        ";
                // line 34
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete_tag")) {
                    // line 35
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("delete_tag", ["id" => twig_get_attribute($this->env, $this->source, ($context["tag"] ?? null), "id", [], "any", false, false, false, 35)]), "class" => "api-link", "attr" => ["data-event" => "kimai.tagDelete kimai.tagUpdate", "data-method" => "DELETE", "data-question" => "confirm.delete", "data-msg-error" => "action.delete.error", "data-msg-success" => "action.delete.success"]]]);
                    // line 36
                    echo "        ";
                }
                // line 37
                echo "    ";
            }
            // line 38
            echo "
    ";
            // line 39
            if (0 !== twig_compare(($context["view"] ?? null), "index")) {
                // line 40
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tags")]);
                // line 41
                echo "    ";
            }
            // line 42
            echo "    
    ";
            // line 43
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.tag", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "tag" => ($context["tag"] ?? null)]);
            // line 44
            echo "    ";
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 45
                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, 45), "actions", [], "any", false, false, false, 45)], 45, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 47
                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, 47), "actions", [], "any", false, false, false, 47)], 47, $context, $this->getSourceContext());
                echo "
    ";
            }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  194 => 47,  188 => 45,  185 => 44,  183 => 43,  180 => 42,  177 => 41,  174 => 40,  172 => 39,  169 => 38,  166 => 37,  163 => 36,  160 => 35,  158 => 34,  155 => 33,  152 => 32,  149 => 31,  147 => 30,  144 => 29,  141 => 28,  138 => 27,  135 => 26,  132 => 25,  129 => 24,  126 => 23,  123 => 22,  121 => 21,  118 => 20,  116 => 19,  113 => 18,  110 => 17,  96 => 16,  84 => 13,  82 => 12,  79 => 11,  77 => 10,  74 => 9,  71 => 8,  68 => 7,  66 => 6,  63 => 5,  61 => 4,  58 => 3,  55 => 2,  42 => 1,  37 => 15,);
    }

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