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

/* embeds/comments.html.twig */
class __TwigTemplate_05dcbe086d40bcb7497633fdb248baf7d21d6ff9b71203e23baa1c85164e0c78 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
        $this->loadTemplate("embeds/comments.html.twig", "embeds/comments.html.twig", 1, "265509536")->display(twig_array_merge($context, ["form" => ($context["form"] ?? null), "comments" => ($context["comments"] ?? null), "route_pin" => (((isset($context["route_pin"]) || array_key_exists("route_pin", $context))) ? (_twig_default_filter(($context["route_pin"] ?? null), null)) : (null)), "route_delete" => (((isset($context["route_delete"]) || array_key_exists("route_delete", $context))) ? (_twig_default_filter(($context["route_delete"] ?? null), null)) : (null))]));
    }

    public function getTemplateName()
    {
        return "embeds/comments.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  37 => 1,);
    }

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


/* embeds/comments.html.twig */
class __TwigTemplate_05dcbe086d40bcb7497633fdb248baf7d21d6ff9b71203e23baa1c85164e0c78___265509536 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'box_title' => [$this, 'block_box_title'],
            'box_attributes' => [$this, 'block_box_attributes'],
            'box_body_class' => [$this, 'block_box_body_class'],
            'box_body' => [$this, 'block_box_body'],
            'box_footer' => [$this, 'block_box_footer'],
        ];
    }

    protected function doGetParent(array $context)
    {
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["widgets"] = $this->macros["widgets"] = $this->loadTemplate("macros/widgets.html.twig", "embeds/comments.html.twig", 2)->unwrap();
        // line 1
        $this->parent = $this->loadTemplate("@AdminLTE/Widgets/box-widget.html.twig", "embeds/comments.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_box_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("label.comment"), "html", null, true);
    }

    // line 4
    public function block_box_attributes($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "id=\"comments_box\"";
    }

    // line 5
    public function block_box_body_class($context, array $blocks = [])
    {
        $macros = $this->macros;
        echo "box-comments";
    }

    // line 6
    public function block_box_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 7
        echo "        ";
        $context["replacer"] = [];
        // line 8
        echo "        ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 8), "preferences", [], "any", false, false, false, 8));
        foreach ($context['_seq'] as $context["_key"] => $context["pref"]) {
            // line 9
            echo "            ";
            $context["replacer"] = twig_array_merge(($context["replacer"] ?? null), [(("{{user." . twig_get_attribute($this->env, $this->source, $context["pref"], "name", [], "any", false, false, false, 9)) . "}}") => twig_get_attribute($this->env, $this->source, $context["pref"], "value", [], "any", false, false, false, 9)]);
            // line 10
            echo "        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pref'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 11
        echo "        ";
        if (0 === twig_compare(twig_length_filter($this->env, ($context["comments"] ?? null)), 0)) {
            // line 12
            echo "            ";
            echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("error.no_comments_found"), "html", null, true);
            echo "
        ";
        }
        // line 14
        echo "        ";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["comments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["comment"]) {
            // line 15
            echo "            <div class=\"box-comment\">
                ";
            // line 16
            echo twig_call_macro($macros["widgets"], "macro_user_avatar", [twig_get_attribute($this->env, $this->source, $context["comment"], "createdBy", [], "any", false, false, false, 16), $this->extensions['App\Twig\DateExtensions']->dateTimeFull(twig_get_attribute($this->env, $this->source, $context["comment"], "createdAt", [], "any", false, false, false, 16)), "img-sm"], 16, $context, $this->getSourceContext());
            echo "
                <div class=\"comment-text\">
                    <span class=\"username\">
                        ";
            // line 19
            echo twig_call_macro($macros["widgets"], "macro_username", [twig_get_attribute($this->env, $this->source, $context["comment"], "createdBy", [], "any", false, false, false, 19)], 19, $context, $this->getSourceContext());
            echo "
                        <span class=\"text-muted pull-right\">
                            ";
            // line 21
            if ( !(null === ($context["route_pin"] ?? null))) {
                // line 22
                echo "                                <a href=\"";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(($context["route_pin"] ?? null), ["id" => twig_get_attribute($this->env, $this->source, $context["comment"], "id", [], "any", false, false, false, 22)]), "html", null, true);
                echo "\" class=\"btn btn-default btn-xs ";
                if (twig_get_attribute($this->env, $this->source, $context["comment"], "pinned", [], "any", false, false, false, 22)) {
                    echo "active";
                }
                echo "\"><i class=\"";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("pin"), "html", null, true);
                echo "\"></i></a>
                            ";
            } elseif (twig_get_attribute($this->env, $this->source,             // line 23
$context["comment"], "pinned", [], "any", false, false, false, 23)) {
                // line 24
                echo "                                <i class=\"";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("pin"), "html", null, true);
                echo "\"></i>
                            ";
            }
            // line 26
            echo "                            ";
            if ( !(null === ($context["route_delete"] ?? null))) {
                // line 27
                echo "                                <a href=\"";
                echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(($context["route_delete"] ?? null), ["id" => twig_get_attribute($this->env, $this->source, $context["comment"], "id", [], "any", false, false, false, 27)]), "html", null, true);
                echo "\" class=\"confirmation-link btn btn-default btn-xs\" data-question=\"confirm.delete\"><i class=\"";
                echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("delete"), "html", null, true);
                echo "\"></i></a>
                            ";
            }
            // line 29
            echo "                        </span>
                    </span>
                    ";
            // line 31
            echo $this->extensions['App\Twig\MarkdownExtension']->markdownToHtml(twig_replace_filter(twig_get_attribute($this->env, $this->source, $context["comment"], "message", [], "any", false, false, false, 31), ($context["replacer"] ?? null)));
            echo "
                </div>
            </div>
        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['comment'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 35
        echo "    ";
    }

    // line 36
    public function block_box_footer($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 37
        if ( !(null === ($context["form"] ?? null))) {
            // line 38
            echo "            ";
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start');
            echo "
            <div class=\"input-group\">
                ";
            // line 40
            echo twig_call_macro($macros["widgets"], "macro_user_avatar", [twig_get_attribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, false, false, 40), false, "img-responsive img-sm"], 40, $context, $this->getSourceContext());
            echo "
                <div class=\"img-push\">
                    ";
            // line 42
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, ($context["form"] ?? null), "message", [], "any", false, false, false, 42), 'widget', ["attr" => ["rows" => "1", "placeholder" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("placeholder.type_message")]]);
            echo "
                </div>
                <span class=\"input-group-btn\">
                    <button type=\"submit\" class=\"btn btn-default\">
                        <i class=\"";
            // line 46
            echo twig_escape_filter($this->env, $this->extensions['App\Twig\IconExtension']->icon("comment"), "html", null, true);
            echo "\"></i>
                    </button>
                </span>
            </div>
            ";
            // line 50
            echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
            echo "
            ";
            // line 51
            echo             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
            echo "
        ";
        }
    }

    public function getTemplateName()
    {
        return "embeds/comments.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  254 => 51,  250 => 50,  243 => 46,  236 => 42,  231 => 40,  225 => 38,  223 => 37,  219 => 36,  215 => 35,  205 => 31,  201 => 29,  193 => 27,  190 => 26,  184 => 24,  182 => 23,  171 => 22,  169 => 21,  164 => 19,  158 => 16,  155 => 15,  150 => 14,  144 => 12,  141 => 11,  135 => 10,  132 => 9,  127 => 8,  124 => 7,  120 => 6,  113 => 5,  106 => 4,  99 => 3,  94 => 1,  92 => 2,  37 => 1,);
    }

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