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

/* team/actions.html.twig */
class __TwigTemplate_d177dc4c48a4d1376864f9c25c21d002ee9c9d05da42b4804919f345758a4071 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_teams($__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", "team/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("create_team")) {
                // line 7
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_team_create")]]);
                // line 8
                echo "    ";
            }
            // line 9
            echo "
    ";
            // line 10
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("teams.html"), "target" => "_blank"]]);
            // line 11
            echo "
    ";
            // line 12
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.teams", ["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_team($__team__ = null, $__view__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "team" => $__team__,
            "view" => $__view__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 17
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "team/actions.html.twig", 17)->unwrap();
            // line 18
            echo "
    ";
            // line 19
            $context["actions"] = [];
            // line 20
            echo "    ";
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["team"] ?? null), "id", [], "any", false, false, false, 20))) {
                // line 21
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["team"] ?? null))) {
                    // line 22
                    echo "            ";
                    $context["class"] = "";
                    // line 23
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_team_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["team"] ?? null), "id", [], "any", false, false, false, 23)]), "class" => ($context["class"] ?? null)]]);
                    // line 24
                    echo "            ";
                    if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_team")) {
                        // line 25
                        echo "                ";
                        $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["copy" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("team_duplicate", ["id" => twig_get_attribute($this->env, $this->source, ($context["team"] ?? null), "id", [], "any", false, false, false, 25)])]]);
                        // line 26
                        echo "            ";
                    }
                    // line 27
                    echo "        ";
                }
                // line 28
                echo "    ";
            }
            // line 29
            echo "
    ";
            // line 30
            if ((0 === twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", ($context["team"] ?? null)))) {
                // line 31
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("delete_team", ["id" => twig_get_attribute($this->env, $this->source, ($context["team"] ?? null), "id", [], "any", false, false, false, 31)]), "class" => "api-link", "attr" => ["data-event" => "kimai.teamDelete kimai.teamUpdate", "data-method" => "DELETE", "data-question" => "confirm.delete", "data-msg-error" => "action.delete.error", "data-msg-success" => "action.delete.success"]]]);
                // line 32
                echo "    ";
            }
            // line 33
            echo "
    ";
            // line 34
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.team", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "team" => ($context["team"] ?? null)]);
            // line 35
            echo "    ";
            if (0 === twig_compare(($context["view"] ?? null), "index")) {
                // line 36
                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, 36), "actions", [], "any", false, false, false, 36)], 36, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 38
                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, 38), "actions", [], "any", false, false, false, 38)], 38, $context, $this->getSourceContext());
                echo "
    ";
            }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  170 => 38,  164 => 36,  161 => 35,  159 => 34,  156 => 33,  153 => 32,  150 => 31,  148 => 30,  145 => 29,  142 => 28,  139 => 27,  136 => 26,  133 => 25,  130 => 24,  127 => 23,  124 => 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("", "team/actions.html.twig", "/var/www/html/kimai2/templates/team/actions.html.twig");
    }
}
