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

/* AkeneoPimEnrichmentBundle:CategoryTree:_scripts.html.twig */
class __TwigTemplate_e3649ec8c8e90c342124c04eac59758ca50cb071a94e1ad5739d3fc913f97735 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
        echo "<script type=\"text/javascript\" nonce=\"";
        echo twig_escape_filter($this->env, $this->env->getExtension('Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension')->getScriptNonce(), "html", null, true);
        echo "\">
    require(
        ['jquery', 'pim/tree/manage'],
        function(\$, TreeManage){
            'use strict';
            \$(function() {
                var buttons = [];
                ";
        // line 8
        if ($this->env->getExtension('Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension')->checkResourceIsGranted((($context["acl"] ?? null) . "_category_create"))) {
            // line 9
            echo "                    buttons.push(\$('<a>', {
                        'class': 'no-hash',
                        'data-toggle': 'tooltip',
                        'data-placement': 'right',
                        'data-original-title': '";
            // line 13
            echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("pim_enrich.create.tree")), "html", null, true);
            echo "'
                    }).html(
                        \$('<i>', { 'class': 'icon-plus-sign' })
                    ).on('click', function () {
                        Backbone.history.navigate('#";
            // line 17
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath((($context["route"] ?? null) . "_categorytree_create"));
            echo "', { trigger: true });
                    }).tooltip());
                ";
        }
        // line 20
        echo "                new TreeManage('#tree', '";
        echo twig_escape_filter($this->env, ($context["route"] ?? null), "html", null, true);
        echo "');
            });
        }
    );
</script>
";
    }

    public function getTemplateName()
    {
        return "AkeneoPimEnrichmentBundle:CategoryTree:_scripts.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  62 => 20,  56 => 17,  49 => 13,  43 => 9,  41 => 8,  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("", "AkeneoPimEnrichmentBundle:CategoryTree:_scripts.html.twig", "/var/www/html/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/CategoryTree/_scripts.html.twig");
    }
}
