<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;

/* components/itilobject/timeline/pending_reasons_messages.html.twig */
class __TwigTemplate_04d1c7e308108293de0ec60fdac109a6 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $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 = []): iterable
    {
        $macros = $this->macros;
        // line 32
        yield "
";
        // line 33
        $context["pending_reason_item_parent"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason_Item::getForItem", [($context["item"] ?? null)]);
        // line 34
        yield "
";
        // line 35
        $context["pending_reason_contexts"] = ["pending" => ["className" => "badge bg-blue-lt", "icon" => "<i class=\"fas fa-pause me-1\"></i>", "text" => __("Pending")], "done" => ["className" => "badge bg-transparent text-muted", "icon" => "<i class=\"fas fa-solid fa-check\"></i>", "text" => __("Done")]];
        // line 47
        yield "
";
        // line 48
        $context["pending_reason_selected_context"] = "pending";
        // line 49
        yield "
";
        // line 50
        if ((($tmp = ($context["display_for_parent"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 51
            yield "   ";
            $context["pending_reason"] = (((($tmp = ($context["pending_reason_item_parent"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason::getById", [(($_v0 = CoreExtension::getAttribute($this->env, $this->source, ($context["pending_reason_item_parent"] ?? null), "fields", [], "any", false, false, false, 51)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0["pendingreasons_id"] ?? null) : null)])) : (false));
        } else {
            // line 53
            yield "   ";
            $context["pending_item"] = (((array_key_exists("pending_item", $context) &&  !(null === $context["pending_item"]))) ? ($context["pending_item"]) : ($this->extensions['Glpi\Application\View\Extension\PhpExtension']->call(((($_v1 = ($context["entry"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1["type"] ?? null) : null) . "::getById"), [(($_v2 = ($context["entry_i"] ?? null)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["id"] ?? null) : null)])));
            // line 54
            yield "   ";
            $context["pending_reason_item"] = (((($tmp = ($context["pending_item"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason_Item::getForItem", [($context["pending_item"] ?? null)])) : (false));
            // line 55
            yield "   ";
            $context["pending_reason"] = (((($tmp = ($context["pending_reason_item"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason::getById", [(($_v3 = CoreExtension::getAttribute($this->env, $this->source, ($context["pending_reason_item"] ?? null), "fields", [], "any", false, false, false, 55)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3["pendingreasons_id"] ?? null) : null)])) : (false));
            // line 56
            yield "   ";
            $context["is_latest_pending"] = $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason_Item::isLastPendingForItem", [            // line 57
($context["item"] ?? null),             // line 58
($context["pending_item"] ?? null)]);
            // line 60
            yield "   ";
            $context["pending_reason_selected_context"] = (((($context["is_latest_pending"] ?? null) && (($context["pending_reason_item_parent"] ?? null) != false))) ? ("pending") : ("done"));
        }
        // line 62
        yield "
";
        // line 63
        if ((($tmp = ($context["pending_reason"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 64
            yield "   <span class=\"";
            yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (($_v4 = ($context["pending_reason_contexts"] ?? null)) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4[($context["pending_reason_selected_context"] ?? null)] ?? null) : null), "className", [], "any", false, false, false, 64), "html", null, true);
            yield " ";
            yield (((($tmp = ($context["display_for_parent"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("mt-1 w-100 text-truncate") : (""));
            yield "\">
      ";
            // line 65
            yield CoreExtension::getAttribute($this->env, $this->source, (($_v5 = ($context["pending_reason_contexts"] ?? null)) && is_array($_v5) || $_v5 instanceof ArrayAccess ? ($_v5[($context["pending_reason_selected_context"] ?? null)] ?? null) : null), "icon", [], "any", false, false, false, 65);
            yield "
      ";
            // line 66
            yield (CoreExtension::getAttribute($this->env, $this->source, (($_v6 = ($context["pending_reason_contexts"] ?? null)) && is_array($_v6) || $_v6 instanceof ArrayAccess ? ($_v6[($context["pending_reason_selected_context"] ?? null)] ?? null) : null), "text", [], "any", false, false, false, 66) . Twig\Extension\CoreExtension::sprintf(": %s", CoreExtension::getAttribute($this->env, $this->source, ($context["pending_reason"] ?? null), "getLink", [], "method", false, false, false, 66)));
            yield "

      ";
            // line 68
            if ((($context["display_for_parent"] ?? null) || $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("PendingReason_Item::isLastPendingForItem", [            // line 69
($context["item"] ?? null),             // line 70
($context["pending_item"] ?? null)]))) {
                // line 72
                yield "         ";
                $context["next_bump"] = CoreExtension::getAttribute($this->env, $this->source, ($context["pending_reason_item_parent"] ?? null), "getNextFollowupDate", [], "method", false, false, false, 72);
                // line 73
                yield "         ";
                if ((($tmp = ($context["next_bump"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 74
                    yield "
            <i class=\"fas fa-clock ms-2\" title=\"";
                    // line 75
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::sprintf(__("Next automatic follow-up scheduled on %s"), $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::convDate", [($context["next_bump"] ?? null)])), "html", null, true);
                    yield "\"
               data-bs-toggle=\"tooltip\"></i>
         ";
                }
                // line 78
                yield "
         ";
                // line 79
                $context["resolve"] = CoreExtension::getAttribute($this->env, $this->source, ($context["pending_reason_item_parent"] ?? null), "getAutoResolvedate", [], "method", false, false, false, 79);
                // line 80
                yield "         ";
                if ((($tmp = ($context["resolve"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
                    // line 81
                    yield "            <i class=\"fas fa-stop ms-2\" title=\"";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::sprintf(__("Automatic resolution scheduled on %s"), $this->extensions['Glpi\Application\View\Extension\PhpExtension']->call("Html::convDate", [($context["resolve"] ?? null)])), "html", null, true);
                    yield "\"
               data-bs-toggle=\"tooltip\"></i>
         ";
                }
                // line 84
                yield "      ";
            }
            // line 85
            yield "   </span>
";
        }
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "components/itilobject/timeline/pending_reasons_messages.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  142 => 85,  139 => 84,  132 => 81,  129 => 80,  127 => 79,  124 => 78,  118 => 75,  115 => 74,  112 => 73,  109 => 72,  107 => 70,  106 => 69,  105 => 68,  100 => 66,  96 => 65,  89 => 64,  87 => 63,  84 => 62,  80 => 60,  78 => 58,  77 => 57,  75 => 56,  72 => 55,  69 => 54,  66 => 53,  62 => 51,  60 => 50,  57 => 49,  55 => 48,  52 => 47,  50 => 35,  47 => 34,  45 => 33,  42 => 32,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "components/itilobject/timeline/pending_reasons_messages.html.twig", "C:\\xampp\\htdocs\\itsm\\templates\\components\\itilobject\\timeline\\pending_reasons_messages.html.twig");
    }
}
