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

/* macros/toolbar.html.twig */
class __TwigTemplate_c5d5ac3f748bfd3b3bd764f664231b61e6c4112dc5cf3ab09bd2307f0d494c42 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 11
        echo "
";
    }

    // line 1
    public function macro_toolbar($__form__ = null, $__collapsible__ = null, $__displayInitial__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "form" => $__form__,
            "collapsible" => $__collapsible__,
            "displayInitial" => $__displayInitial__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 2
            echo "    ";
            @trigger_error("The macro \"toolbar\" is deprecated since 1.2 and will be removed with 2.0, use dropDownSearch() instead"." (\"macros/toolbar.html.twig\" at line 2).", E_USER_DEPRECATED);
            // line 3
            echo "    <div class=\"toolbar no-print\">
        ";
            // line 4
            if (($context["collapsible"] ?? null)) {
                echo "<div class=\"collapse";
                if (($context["displayInitial"] ?? null)) {
                    echo " collapse.show in";
                }
                echo "\" id=\"";
                echo twig_escape_filter($this->env, ($context["collapsible"] ?? null), "html", null, true);
                echo "\">";
            }
            // line 5
            echo "            ";
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start', ["attr" => ["class" => "navbar-form"]]);
            echo "
            ";
            // line 6
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
            echo "
            ";
            // line 7
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
            echo "
        ";
            // line 8
            if (($context["collapsible"] ?? null)) {
                echo "</div>";
            }
            // line 9
            echo "    </div>
";

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

    // line 12
    public function macro_dropDownSearch($__form__ = null, ...$__varargs__)
    {
        $macros = $this->macros;
        $context = $this->env->mergeGlobals([
            "form" => $__form__,
            "varargs" => $__varargs__,
        ]);

        $blocks = [];

        ob_start(function () { return ''; });
        try {
            // line 13
            echo "    ";
            $this->env->getRuntime("Symfony\\Component\\Form\\FormRenderer")->setTheme(($context["form"] ?? null), [0 => "form/search-form.html.twig"], true);
            // line 14
            echo "    ";
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start', ["attr" => ["class" => "form-horizontal header-search hidden-xs"]]);
            echo "
    ";
            // line 15
            $context["searchTermClass"] = "dropdown-toggle input-sm";
            // line 16
            echo "    ";
            if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "searchTerm", [], "any", false, false, false, 16), "vars", [], "any", false, false, false, 16), "valid", [], "any", false, false, false, 16)) {
                // line 17
                echo "        ";
                $context["searchTermClass"] = (($context["searchTermClass"] ?? null) . " search-has-error");
                // line 18
                echo "    ";
            }
            // line 19
            echo "    ";
            if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 19), "valid", [], "any", false, false, false, 19)) {
                // line 20
                echo "        ";
                $context["searchTermClass"] = (($context["searchTermClass"] ?? null) . " has-error");
                // line 21
                echo "    ";
            }
            // line 22
            echo "    <div class=\"dropdown\">
        <div class=\"form-group\">
            <div class=\"input-group\">
                <div class=\"input-group-addon ";
            // line 25
            if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 25), "valid", [], "any", false, false, false, 25)) {
                echo " has-error";
            }
            echo "\">
                    <i class=\"";
            // line 26
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("search"), "html", null, true);
            echo "\"></i>
                </div>
                ";
            // line 28
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "searchTerm", [], "any", false, false, false, 28), 'widget', ["attr" => ["placeholder" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("search"), "autocomplete" => "off", "data-toggle" => "dropdown", "class" => ($context["searchTermClass"] ?? null), "aria-haspopup" => "true", "aria-expanded" => "true"]]);
            echo "
                <ul class=\"dropdown-menu pre-scrollable\" role=\"menu\" aria-labelledby=\"searchTerm\">
                    <li>
                        <div class=\"container-fluid\">
                            ";
            // line 32
            if ( !twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "searchTerm", [], "any", false, false, false, 32), "vars", [], "any", false, false, false, 32), "valid", [], "any", false, false, false, 32)) {
                // line 33
                echo "                                ";
                echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "searchTerm", [], "any", false, false, false, 33), 'errors');
                echo "
                                <br>
                            ";
            }
            // line 36
            echo "                            ";
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
            echo "
                            <div class=\"form-group\">
                                <div class=\"col-sm-3 col-xs-4\"></div>
                                <div class=\"col-sm-9 col-xs-8\">
                                    ";
            // line 40
            if ( !$this->extensions['App\Twig\ConfigExtension']->getThemeConfig("auto_reload_datatable")) {
                // line 41
                echo "                                        ";
                // line 42
                echo "                                    <input type=\"submit\" value=\"";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("search"), "html", null, true);
                echo "\" class=\"btn btn-primary\" />
                                    ";
            }
            // line 44
            echo "                                    <a href=\"#\" class=\"search-cancel pull-right\">";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("action.close"), "html", null, true);
            echo "</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    ";
            // line 53
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
            echo "
";

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

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  204 => 53,  191 => 44,  185 => 42,  183 => 41,  181 => 40,  173 => 36,  166 => 33,  164 => 32,  157 => 28,  152 => 26,  146 => 25,  141 => 22,  138 => 21,  135 => 20,  132 => 19,  129 => 18,  126 => 17,  123 => 16,  121 => 15,  116 => 14,  113 => 13,  100 => 12,  90 => 9,  86 => 8,  82 => 7,  78 => 6,  73 => 5,  63 => 4,  60 => 3,  57 => 2,  42 => 1,  37 => 11,);
    }

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