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

/* customer/actions.html.twig */
class __TwigTemplate_497c70fc33fe10755835554c6ed44314e4e69fc6ced790846f430076074eea93 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 17
        echo "
";
    }

    // line 1
    public function macro_customers($__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", "customer/actions.html.twig", 2)->unwrap();
            // line 3
            echo "
    ";
            // line 4
            $context["actions"] = ["search" => ["class" => "search-toggle visible-xs-inline"], "visibility" => "#modal_customer_admin"];
            // line 5
            echo "
    ";
            // line 6
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["download" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("customer_export"), "class" => "toolbar-action"]]);
            // line 7
            echo "
    ";
            // line 8
            if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_customer")) {
                // line 9
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer_create")]);
                // line 10
                echo "    ";
            }
            // line 11
            echo "
    ";
            // line 12
            $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["help" => ["url" => $this->extensions['App\Twig\Extensions']->documentationLink("customer.html"), "target" => "_blank"]]);
            // line 13
            echo "
    ";
            // line 14
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.customers", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null)]);
            // line 15
            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, 15), "actions", [], "any", false, false, false, 15)], 15, $context, $this->getSourceContext());
            echo "
";

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

    // line 18
    public function macro_customer($__customer__ = null, $__view__ = null, $__options__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "customer" => $__customer__,
            "view" => $__view__,
            "options" => $__options__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 19
            echo "    ";
            $macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "customer/actions.html.twig", 19)->unwrap();
            // line 20
            echo "    ";
            $context["actions"] = [];
            // line 21
            echo "
    ";
            // line 22
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 22))) {
                // line 23
                echo "        ";
                if ((0 !== twig_compare(($context["view"] ?? null), "details") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view", ($context["customer"] ?? null)))) {
                    // line 24
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["details" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("customer_details", ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 24)])]);
                    // line 25
                    echo "        ";
                }
                // line 26
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("edit", ($context["customer"] ?? null))) {
                    // line 27
                    echo "            ";
                    $context["class"] = "";
                    // line 28
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "edit")) {
                        // line 29
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 30
                        echo "            ";
                    }
                    // line 31
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["edit" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer_edit", ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 31)]), "class" => ($context["class"] ?? null)]]);
                    // line 32
                    echo "        ";
                }
                // line 33
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("permissions", ($context["customer"] ?? null))) {
                    // line 34
                    echo "            ";
                    $context["class"] = "";
                    // line 35
                    echo "            ";
                    if (0 !== twig_compare(($context["view"] ?? null), "permissions")) {
                        // line 36
                        echo "                ";
                        $context["class"] = "modal-ajax-form";
                        // line 37
                        echo "            ";
                    }
                    // line 38
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["permissions" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer_permissions", ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 38)]), "class" => ($context["class"] ?? null)]]);
                    // line 39
                    echo "        ";
                }
                // line 40
                echo "        ";
                if (1 === twig_compare(twig_length_filter($this->env, ($context["actions"] ?? null)), 0)) {
                    // line 41
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["divider" => null]);
                    // line 42
                    echo "        ";
                }
                // line 43
                echo "        ";
                if ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_project") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_teamlead_project")) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_team_project"))) {
                    // line 44
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["project" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project", ["customers[]" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 44)])]);
                    // line 45
                    echo "        ";
                }
                // line 46
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_activity")) {
                    // line 47
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["activity" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_activity", ["customers[]" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 47)])]);
                    // line 48
                    echo "        ";
                }
                // line 49
                echo "        ";
                if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("view_other_timesheet")) {
                    // line 50
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["timesheet" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_timesheet", ["customers[]" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 50)])]);
                    // line 51
                    echo "        ";
                }
                // line 52
                echo "        ";
                if ((twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "visible", [], "any", false, false, false, 52) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("create_project"))) {
                    // line 53
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["create-project" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_project_create_with_customer", ["customer" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 53)]), "class" => "modal-ajax-form"]]);
                    // line 54
                    echo "        ";
                }
                // line 55
                echo "        ";
                if ((0 === twig_compare(($context["view"] ?? null), "index") && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("delete", ($context["customer"] ?? null)))) {
                    // line 56
                    echo "            ";
                    $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["trash" => ["url" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer_delete", ["id" => twig_get_attribute($this->env, $this->source, ($context["customer"] ?? null), "id", [], "any", false, false, false, 56)]), "class" => "modal-ajax-form"]]);
                    // line 57
                    echo "        ";
                }
                // line 58
                echo "    ";
            }
            // line 59
            echo "
    ";
            // line 60
            if ((0 !== twig_compare(($context["view"] ?? null), "index") && 0 !== twig_compare(($context["view"] ?? null), "custom"))) {
                // line 61
                echo "        ";
                $context["actions"] = twig_array_merge(($context["actions"] ?? null), ["back" => ((twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", true, true, false, 61)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["options"] ?? null), "back", [], "any", false, false, false, 61), $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer"))) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_customer")))]);
                // line 62
                echo "    ";
            }
            // line 63
            echo "
    ";
            // line 64
            $context["event"] = $this->env->getRuntime('App\Twig\Runtime\ThemeEventExtension')->trigger("actions.customer", ["actions" => ($context["actions"] ?? null), "view" => ($context["view"] ?? null), "customer" => ($context["customer"] ?? null)]);
            // line 65
            echo "    ";
            if ((0 === twig_compare(($context["view"] ?? null), "index") || 0 === twig_compare(($context["view"] ?? null), "custom"))) {
                // line 66
                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, 66), "actions", [], "any", false, false, false, 66)], 66, $context, $this->getSourceContext());
                echo "
    ";
            } else {
                // line 68
                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, 68), "actions", [], "any", false, false, false, 68)], 68, $context, $this->getSourceContext());
                echo "
    ";
            }

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  260 => 68,  254 => 66,  251 => 65,  249 => 64,  246 => 63,  243 => 62,  240 => 61,  238 => 60,  235 => 59,  232 => 58,  229 => 57,  226 => 56,  223 => 55,  220 => 54,  217 => 53,  214 => 52,  211 => 51,  208 => 50,  205 => 49,  202 => 48,  199 => 47,  196 => 46,  193 => 45,  190 => 44,  187 => 43,  184 => 42,  181 => 41,  178 => 40,  175 => 39,  172 => 38,  169 => 37,  166 => 36,  163 => 35,  160 => 34,  157 => 33,  154 => 32,  151 => 31,  148 => 30,  145 => 29,  142 => 28,  139 => 27,  136 => 26,  133 => 25,  130 => 24,  127 => 23,  125 => 22,  122 => 21,  119 => 20,  116 => 19,  101 => 18,  89 => 15,  87 => 14,  84 => 13,  82 => 12,  79 => 11,  76 => 10,  73 => 9,  71 => 8,  68 => 7,  66 => 6,  63 => 5,  61 => 4,  58 => 3,  55 => 2,  42 => 1,  37 => 17,);
    }

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