<?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:index.html.twig */
class __TwigTemplate_16ed7ea182308c1f69d12f7c9d3b427b5884d71be377f6cfb4905d8e791185e8 extends \Twig\Template
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $context["elements"] = $this->loadTemplate("PimUIBundle:Default:page_elements.html.twig", "AkeneoPimEnrichmentBundle:CategoryTree:index.html.twig", 1)->unwrap();
        // line 2
        echo "
";
        // line 3
        $this->displayBlock('content', $context, $blocks);
        // line 33
        echo "
<script nonce=\"";
        // line 34
        echo twig_escape_filter($this->env, $this->env->getExtension('Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension')->getScriptNonce(), "html", null, true);
        echo "\">
    window.flashMessages = JSON.parse('";
        // line 35
        echo twig_jsonencode_filter($this->getAttribute($this->getAttribute($this->getAttribute(($context["app"] ?? null), "session", []), "flashbag", []), "all", []));
        echo "');

    require(
        [
            'pim/common/breadcrumbs',
            'pim/fetcher-registry',
            'pim/form-builder',
            'pim/menu/resizable'
        ],
        function(
            Breadcrumbs,
            FetcherRegistry,
            FormBuilder,
            Resizable
        ) {
            \$(function() {
                var breadcrumbs = new Breadcrumbs({
                    config: {
                        tab: 'pim-menu-settings',
                        item: 'pim-menu-settings-product-category'
                    }
                });
                breadcrumbs.configure().then(function () {
                    breadcrumbs.render();
                    \$('*[data-drop-zone=\"breadcrumbs\"]').append(breadcrumbs.\$el);
                });

                FetcherRegistry.initialize().done(function () {
                    FormBuilder.build('pim-menu-user-navigation').then(function (form) {
                        \$('.user-menu').append(form.el);
                        form.render();
                    }.bind(this));
                });

                Resizable.set({
                    minWidth: 300,
                    maxWidth: 500,
                    container: '.ui-resizable-container',
                    storageKey: 'category-tree-edit'
                });
            });
        }
    );
</script>
";
    }

    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "<div class=\"AknDefault-mainContent\">
    ";
        // line 5
        $context["title"] = $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("category.overview");
        // line 6
        echo "    ";
        echo $context["elements"]->getpage_header(["title" => ($context["title"] ?? null)]);
        echo "

    <div id=\"category-tree-container\" style=\"display:flex; height:100%\">
        <div class=\"ui-resizable-container\">
            <div id=\"tree\" ";
        // line 10
        if ($this->env->getExtension('Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension')->checkResourceIsGranted((($context["acl"] ?? null) . "_category_edit"))) {
            echo " data-editable=\"true\"";
        }
        if ($this->env->getExtension('Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension')->checkResourceIsGranted((($context["acl"] ?? null) . "_category_create"))) {
            echo " data-creatable=\"true\"";
        }
        echo "></div>
        </div>

        <div id=\"category-form\" style=\"flex-grow:1\" class=\"AknDefault-mainContent\">
            <div class=\"AknInfoBlock\">
                ";
        // line 15
        if ($this->env->getExtension('Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension')->checkResourceIsGranted((($context["acl"] ?? null) . "_category_edit"))) {
            // line 16
            echo "                    ";
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("pim_enrich.category.suggest_selection"), "html", null, true);
            echo "
                ";
        }
        // line 18
        echo "                ";
        if ($this->env->getExtension('Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension')->checkResourceIsGranted((($context["acl"] ?? null) . "_category_create"))) {
            // line 19
            echo "                    <br/>
                    ";
            // line 20
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("pim_enrich.category.or"), "html", null, true);
            echo "
                    <br/>
                    <a class=\"AknButton AknButton--apply\" href=\"#";
            // line 22
            echo $this->env->getExtension('Symfony\Bridge\Twig\Extension\RoutingExtension')->getPath((($context["route"] ?? null) . "_categorytree_create"), ["parent" => 0]);
            echo "\">
                        ";
            // line 23
            echo twig_escape_filter($this->env, $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("pim_enrich.category.create_new"), "html", null, true);
            echo "
                    </a>
                ";
        }
        // line 26
        echo "            </div>
        </div>
    </div>

    ";
        // line 30
        $this->loadTemplate("AkeneoPimEnrichmentBundle:CategoryTree:_scripts.html.twig", "AkeneoPimEnrichmentBundle:CategoryTree:index.html.twig", 30)->display($context);
        // line 31
        echo "</div>
";
    }

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

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  160 => 31,  158 => 30,  152 => 26,  146 => 23,  142 => 22,  137 => 20,  134 => 19,  131 => 18,  125 => 16,  123 => 15,  110 => 10,  102 => 6,  100 => 5,  97 => 4,  94 => 3,  45 => 35,  41 => 34,  38 => 33,  36 => 3,  33 => 2,  31 => 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:index.html.twig", "/var/www/html/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Enrichment/Bundle/Resources/views/CategoryTree/index.html.twig");
    }
}
