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

/* @PimUser/Group/update.html.twig */
class __TwigTemplate_d5a52602c844a15e2b2a235115302100 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'navButtons' => [$this, 'block_navButtons'],
            'content_data' => [$this, 'block_content_data'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "@PimUI/actions/update.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 2
        $macros["UI"] = $this->macros["UI"] = $this->loadTemplate("@PimUI/macros.html.twig", "@PimUser/Group/update.html.twig", 2)->unwrap();
        // line 3
        $macros["dataGrid"] = $this->macros["dataGrid"] = $this->loadTemplate("@PimDataGrid/macros.html.twig", "@PimUser/Group/update.html.twig", 3)->unwrap();
        // line 4
        $macros["elements"] = $this->macros["elements"] = $this->loadTemplate("@PimUI/Default/page_elements.html.twig", "@PimUser/Group/update.html.twig", 4)->unwrap();
        // line 6
        $context["entityId"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 6), "value", [], "any", false, false, false, 6), "id", [], "any", false, false, false, 6);
        // line 7
        $context["title"] = ((($context["entityId"] ?? null)) ? ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Update Group")) : ($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("New Group")));
        // line 8
        $context["gridName"] = "pimgroup-user-grid";
        // line 9
        $context["formAction"] = ((($context["entityId"] ?? null)) ? ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pim_user_group_update", ["id" => ($context["entityId"] ?? null)])) : ($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pim_user_group_create")));
        // line 11
        $context["breadcrumbs"] = [];
        // line 12
        if (($context["entityId"] ?? null)) {
            // line 13
            $context["breadcrumbs"] = ["entity" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 14
($context["form"] ?? null), "vars", [], "any", false, false, false, 14), "value", [], "any", false, false, false, 14), "indexPath" => Twig\Extension\CoreExtension::sprintf("#%s", $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pim_user_group_index")), "indexLabel" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Groups"), "entityTitle" => CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source,             // line 17
($context["form"] ?? null), "vars", [], "any", false, false, false, 17), "value", [], "any", false, false, false, 17), "name", [], "any", false, false, false, 17)];
        } else {
            // line 21
            $context["breadcrumbs"] = ($context["title"] ?? null);
        }
        // line 1
        $this->parent = $this->loadTemplate("@PimUI/actions/update.html.twig", "@PimUser/Group/update.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 24
    public function block_navButtons($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 25
        yield "    ";
        if ((($context["entityId"] ?? null) && $this->extensions['Oro\Bundle\SecurityBundle\Twig\OroSecurityExtension']->checkResourceIsGranted("pim_user_group_remove"))) {
            // line 26
            yield "        <div class=\"AknSecondaryActions AknDropdown AknButtonList-item secondary-actions\">
          <div class=\"AknSecondaryActions-button dropdown-button\" data-toggle=\"dropdown\"></div>
          <div class=\"AknDropdown-menu AknDropdown-menu--right\">
              <div class=\"AknDropdown-menuTitle\">";
            // line 29
            yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("other_actions"), "html", null, true);
            yield "</div>
              ";
            // line 30
            yield CoreExtension::callMacro($macros["elements"], "macro_deleteLink", [$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pim_user_group_delete", ["id" =>             // line 31
($context["entityId"] ?? null)]), "pim_user_group_remove", $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("pim_user_group_index"), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Are you sure you want to delete this group?"), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Group removed"), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("confirmation.delete"), "AknDropdown-menuLink delete", $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Groups")], 30, $context, $this->getSourceContext());
            // line 39
            yield "
          </div>
        </div>
    ";
        }
        // line 43
        yield "    ";
        yield CoreExtension::callMacro($macros["UI"], "macro_saveAndStayButton", ["pim_user_group_edit"], 43, $context, $this->getSourceContext());
        yield "
";
        return; yield '';
    }

    // line 46
    public function block_content_data($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 47
        yield "    ";
        $context["id"] = "group-profile";
        // line 48
        yield "
        ";
        // line 49
        yield CoreExtension::callMacro($macros["elements"], "macro_form_navbar", [$this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ViewElementExtension']->getViewElementAliases($context, (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 49), "id", [], "any", false, false, false, 49) . ".form_tab"))], 49, $context, $this->getSourceContext());
        yield "

        <div class=\"AknTabContainer-content tab-content\">
            ";
        // line 52
        yield CoreExtension::callMacro($macros["elements"], "macro_form_errors", [($context["form"] ?? null)], 52, $context, $this->getSourceContext());
        yield "
            ";
        // line 53
        yield $this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ViewElementExtension']->renderViewElements($context, (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 53), "id", [], "any", false, false, false, 53) . ".form_tab"));
        yield "
        </div>

    <script type=\"text/javascript\" nonce=\"";
        // line 56
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension']->getScriptNonce(), "html", null, true);
        yield "\">
        require('pim/page-title').set({'group': '";
        // line 57
        yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["form"] ?? null), "vars", [], "any", false, false, false, 57), "value", [], "any", false, false, false, 57), "name", [], "any", false, false, false, 57), "html", null, true);
        yield "'});

        window.flashMessages = JSON.parse('";
        // line 59
        yield json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "session", [], "any", false, false, false, 59), "flashbag", [], "any", false, false, false, 59), "all", [], "any", false, false, false, 59));
        yield "');
    </script>

    <script nonce=\"";
        // line 62
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension']->getScriptNonce(), "html", null, true);
        yield "\">
        require(
            [
                'pim/common/breadcrumbs',
                'pim/fetcher-registry',
                'pim/form-builder'
            ],
            function(
                Breadcrumbs,
                FetcherRegistry,
                FormBuilder
            ) {
                \$(function() {
                    var breadcrumbs = new Breadcrumbs({
                        config: {
                            tab: 'pim-menu-system',
                            item: 'pim-menu-system-user-group'
                        }
                    });
                    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));
                    });
                });
            }
        );
    </script>
";
        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "@PimUser/Group/update.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  149 => 62,  143 => 59,  138 => 57,  134 => 56,  128 => 53,  124 => 52,  118 => 49,  115 => 48,  112 => 47,  108 => 46,  100 => 43,  94 => 39,  92 => 31,  91 => 30,  87 => 29,  82 => 26,  79 => 25,  75 => 24,  70 => 1,  67 => 21,  64 => 17,  63 => 14,  62 => 13,  60 => 12,  58 => 11,  56 => 9,  54 => 8,  52 => 7,  50 => 6,  48 => 4,  46 => 3,  44 => 2,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("", "@PimUser/Group/update.html.twig", "/var/www/html/pim/vendor/akeneo/pim-community-dev/src/Akeneo/UserManagement/Bundle/Resources/views/Group/update.html.twig");
    }
}
