<?php

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

/* PimAnalyticsBundle:Update:last_patch.html.twig */
class __TwigTemplate_7216a18ed96ced44a71a5fc57c08a995386a1166d7caa2fc0d0a58da259b68d2 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        if ($this->env->getExtension('Akeneo\Platform\Bundle\AnalyticsBundle\Twig\UpdateExtension')->isLastPatchEnabled()) {
            // line 2
            echo "    <div class=\"AknFooter-item last-version\" style=\"display: none;\"><span>";
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("pim_analytics.new_patch_available"), "html", null, true);
            echo ":</span><span></span></div>

    <script type=\"text/javascript\" nonce=\"";
            // line 4
            echo twig_escape_filter($this->env, $this->env->getExtension('Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension')->getScriptNonce(), "html", null, true);
            echo "\">
        require(
            ['jquery', 'pim/patch-fetcher'],
            function (\$, Fetcher) {
                \$(function() {
                    var updateServerUrl = '";
            // line 9
            echo twig_escape_filter($this->env, $this->env->getExtension('Akeneo\Platform\Bundle\AnalyticsBundle\Twig\UpdateExtension')->getUpdateServerUrl(), "html", null, true);
            echo "';
                    Fetcher.fetch(updateServerUrl).then(function (patch) {
                        var currentVersionName = \$('.current-version:first span:last').text();
                        var currentVersion = currentVersionName.split(' ')[1];
                        if (patch !== null && currentVersion < patch) {
                            \$('.last-version span:last').text(patch);
                            \$('.last-version').show();
                        }
                    });
                });
            }
        );
    </script>
";
        }
    }

    public function getTemplateName()
    {
        return "PimAnalyticsBundle:Update:last_patch.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  46 => 9,  38 => 4,  32 => 2,  30 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Source("", "PimAnalyticsBundle:Update:last_patch.html.twig", "/var/www/html/vendor/akeneo/pim-community-dev/src/Akeneo/Platform/Bundle/AnalyticsBundle/Resources/views/Update/last_patch.html.twig");
    }
}
