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

/* @PimNotification/Notification/list.json.twig */
class __TwigTemplate_6e109faca029d7b63ef8ddd4e07f1d61 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
        $context["notifications"] = [];
        // line 2
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["userNotifications"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 3
            yield "    ";
            if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, true, false, 3), "context", [], "any", false, true, false, 3), "gridParameters", [], "any", true, true, false, 3) &&  !(null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 3), "route", [], "any", false, false, false, 3)))) {
                // line 4
                yield "        ";
                $context["generatedUrl"] = (($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 4), "route", [], "any", false, false, false, 4)) . "|g/") . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 4), "context", [], "any", false, false, false, 4), "gridParameters", [], "any", false, false, false, 4));
                // line 5
                yield "    ";
            } elseif ( !(null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 5), "route", [], "any", false, false, false, 5))) {
                // line 6
                yield "        ";
                $context["generatedUrl"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 6), "route", [], "any", false, false, false, 6), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 6), "routeParams", [], "any", false, false, false, 6));
                // line 7
                yield "    ";
            } else {
                // line 8
                yield "        ";
                $context["generatedUrl"] = null;
                // line 9
                yield "    ";
            }
            // line 10
            yield "
    ";
            // line 11
            $context["sanitizedMessageParams"] = [];
            // line 12
            yield "    ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 12), "messageParams", [], "any", false, false, false, 12));
            foreach ($context['_seq'] as $context["labelKey"] => $context["value"]) {
                // line 13
                yield "        ";
                $context["sanitizedMessageParams"] = Twig\Extension\CoreExtension::arrayMerge(($context["sanitizedMessageParams"] ?? null), [("" . $context["labelKey"]) => Twig\Extension\EscaperExtension::escape($this->env, $context["value"])]);
                // line 14
                yield "    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['labelKey'], $context['value'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 15
            yield "
    ";
            // line 16
            $context["notifications"] = Twig\Extension\CoreExtension::arrayMerge(($context["notifications"] ?? null), [["id" => CoreExtension::getAttribute($this->env, $this->source,             // line 17
$context["item"], "id", [], "any", false, false, false, 17), "type" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 18
$context["item"], "notification", [], "any", false, false, false, 18), "type", [], "any", false, false, false, 18), "message" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 19
$context["item"], "notification", [], "any", false, false, false, 19), "message", [], "any", false, false, false, 19), ($context["sanitizedMessageParams"] ?? null)), "viewed" => CoreExtension::getAttribute($this->env, $this->source,             // line 20
$context["item"], "viewed", [], "any", false, false, false, 20), "url" =>             // line 21
($context["generatedUrl"] ?? null), "createdAt" => Twig\Extension\CoreExtension::dateFormatFilter($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 22
$context["item"], "notification", [], "any", false, false, false, 22), "created", [], "any", false, false, false, 22), "Y-m-d H:i:s", ($context["userTimezone"] ?? null)), "actionType" => ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 23
$context["item"], "notification", [], "any", false, false, false, 23), "context", [], "any", false, false, false, 23), "actionType", [], "any", false, false, false, 23)) ? (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 23), "context", [], "any", false, false, false, 23), "actionType", [], "any", false, false, false, 23)) : (null)), "buttonLabel" => ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 24
$context["item"], "notification", [], "any", false, true, false, 24), "context", [], "any", false, true, false, 24), "buttonLabel", [], "any", true, true, false, 24)) ? ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 24), "context", [], "any", false, false, false, 24), "buttonLabel", [], "any", false, false, false, 24))) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("pim_notification.report"))), "showReportButton" => ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 25
$context["item"], "notification", [], "any", false, true, false, 25), "context", [], "any", false, true, false, 25), "showReportButton", [], "any", true, true, false, 25)) ? (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 25), "context", [], "any", false, false, false, 25), "showReportButton", [], "any", false, false, false, 25)) : (true)), "comment" => ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 26
$context["item"], "notification", [], "any", false, false, false, 26), "comment", [], "any", false, false, false, 26)) ? (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["item"], "notification", [], "any", false, false, false, 26), "comment", [], "any", false, false, false, 26)) : (null))]]);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 29
        $context["data"] = ["notifications" => ($context["notifications"] ?? null), "unreadCount" => $this->extensions['Akeneo\Platform\Bundle\NotificationBundle\Twig\NotificationExtension']->countNotifications()];
        // line 30
        yield json_encode(($context["data"] ?? null));
        yield "
";
        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "@PimNotification/Notification/list.json.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  105 => 30,  103 => 29,  97 => 26,  96 => 25,  95 => 24,  94 => 23,  93 => 22,  92 => 21,  91 => 20,  90 => 19,  89 => 18,  88 => 17,  87 => 16,  84 => 15,  78 => 14,  75 => 13,  70 => 12,  68 => 11,  65 => 10,  62 => 9,  59 => 8,  56 => 7,  53 => 6,  50 => 5,  47 => 4,  44 => 3,  40 => 2,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@PimNotification/Notification/list.json.twig", "/var/www/html/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/NotificationBundle/Resources/views/Notification/list.json.twig");
    }
}
