<?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/layout.html.twig */
class __TwigTemplate_8f340aaff943c9b70e49848004c03619 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->parent = false;

        $this->blocks = [
            'head' => [$this, 'block_head'],
            'title' => [$this, 'block_title'],
            'head_style' => [$this, 'block_head_style'],
            'bodyClass' => [$this, 'block_bodyClass'],
            'main' => [$this, 'block_main'],
            'brandLogo' => [$this, 'block_brandLogo'],
            'messages' => [$this, 'block_messages'],
            'content' => [$this, 'block_content'],
            'deferred_javascript' => [$this, 'block_deferred_javascript'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 1
        yield "<!DOCTYPE html>
<html>
<head>
    ";
        // line 4
        yield from $this->unwrap()->yieldBlock('head', $context, $blocks);
        // line 15
        yield "    ";
        yield $this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ExternalJavascriptDependenciesExtension']->getExternalJavascriptDependencies();
        yield "
</head>
<body class=\"";
        // line 17
        yield from $this->unwrap()->yieldBlock('bodyClass', $context, $blocks);
        yield "\">
    <div id=\"page\">
        <div id=\"top-page\">
            ";
        // line 20
        yield from $this->unwrap()->yieldBlock('main', $context, $blocks);
        // line 65
        yield "        </div>
    </div>
    ";
        // line 67
        yield from $this->unwrap()->yieldBlock('deferred_javascript', $context, $blocks);
        // line 101
        yield "</body>
</html>
";
        return; yield '';
    }

    // line 4
    public function block_head($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 5
        yield "        <title>
            ";
        // line 6
        yield from $this->unwrap()->yieldBlock('title', $context, $blocks);
        // line 8
        yield "        </title>
        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
        ";
        // line 10
        yield from $this->unwrap()->yieldBlock('head_style', $context, $blocks);
        // line 14
        yield "    ";
        return; yield '';
    }

    // line 6
    public function block_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        yield "            ";
        return; yield '';
    }

    // line 10
    public function block_head_style($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 11
        yield "            <link rel=\"shortcut icon\" href=\"";
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("favicon.ico"), "html", null, true);
        yield "\" />
            <link rel=\"stylesheet\" href=\"";
        // line 12
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/pim.css", "frontend"), "html", null, true);
        yield "\"/>
        ";
        return; yield '';
    }

    // line 17
    public function block_bodyClass($context, array $blocks = [])
    {
        $macros = $this->macros;
        return; yield '';
    }

    // line 20
    public function block_main($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 21
        yield "            <div class=\"AuthenticationWrapper\">
                <div class=\"LeftWrapper\">
                    <div class=\"FormWrapper\">
                        ";
        // line 25
        yield "                        <div class=\"Logo AknLogin-title\">";
        // line 26
        yield from $this->unwrap()->yieldBlock('brandLogo', $context, $blocks);
        // line 31
        yield "</div>
                        <div class=\"ContainerForm\">
                            <div class=\"Messages\">
                                ";
        // line 34
        yield from $this->unwrap()->yieldBlock('messages', $context, $blocks);
        // line 46
        yield "                            </div>
                            ";
        // line 47
        yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
        // line 49
        yield "                        </div>
                    </div>
                    <a class=\"Footer\" href=\"https://www.akeneo.com/\" target=\"_blank\">
                        <div class=\"Powered\">
                            ";
        // line 53
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("pim_login.footer.powered"), "html", null, true);
        yield "
                            <img class=\"PoweredImage\" src=\"";
        // line 54
        yield "/bundles/pimui/images/logo_login.svg";
        yield "\" alt=\"";
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("pim_login.footer.powered_image_title"));
        yield "\" />
                        </div>
                        <div class=\"BaseLine\">Unlocking Growth Through Product Experiences</div>
                    </a>
                </div>
                <div class=\"RightWrapper\">
                    <div class=\"IllustrationLogin\"></div>
                </div>
            </div>

            ";
        return; yield '';
    }

    // line 26
    public function block_brandLogo($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 27
        yield "<img src=\"";
        yield "/bundles/pimui/images/illustrations/login/Logo.svg";
        yield "\"
                                     alt=\"";
        // line 28
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("pim_login.logo_title"));
        yield "\"
                                     width=\"250\" height=\"60\" />";
        return; yield '';
    }

    // line 34
    public function block_messages($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 35
        yield "                                    ";
        if ((Twig\Extension\CoreExtension::lengthFilter($this->env, 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, 35), "flashbag", [], "any", false, false, false, 35), "peekAll", [], "any", false, false, false, 35)) > 0)) {
            // line 36
            yield "                                        ";
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(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, 36), "flashbag", [], "any", false, false, false, 36), "all", [], "any", false, false, false, 36));
            foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
                // line 37
                yield "                                            ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
                foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
                    // line 38
                    yield "                                                <div class=\"Helper ";
                    (($context["type"]) ? (yield Twig\Extension\EscaperExtension::escape($this->env, (" Helper--" . $context["type"]), "html", null, true)) : (yield ""));
                    yield "\">
                                                    <span class=\"Icon\"></span>
                                                    <span class=\"Text\">";
                    // line 40
                    yield $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($context["message"]);
                    yield "</span>
                                                </div>
                                            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 43
                yield "                                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['type'], $context['messages'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 44
            yield "                                    ";
        }
        // line 45
        yield "                                ";
        return; yield '';
    }

    // line 47
    public function block_content($context, array $blocks = [])
    {
        $macros = $this->macros;
        yield "                            ";
        return; yield '';
    }

    // line 67
    public function block_deferred_javascript($context, array $blocks = [])
    {
        $macros = $this->macros;
        // line 68
        yield "        <script type=\"text/javascript\" nonce=\"";
        yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Akeneo\Platform\Bundle\UIBundle\Twig\ContentSecurityPolicyExtension']->getScriptNonce(), "html", null, true);
        yield "\">
            const initPimLoginForm = function(fields, submit, form) {
              if (!Array.isArray(fields) || !submit || !form) {
                return;
              }

              const validate = function (fields) {
                return fields.reduce(function (isValid, field) {
                  return (isValid && field.value.length > 0);
                }, true);
              };

              const changeHandler = function () {
                if (validate(fields) ) {
                  submit.removeAttribute('disabled');
                  submit.classList.remove('AknButton--disabled');
                } else {
                  submit.setAttribute('disabled', 'true');
                  submit.classList.add('AknButton--disabled');
                }
              };

              fields.forEach(function (field) {
                field.addEventListener('input', changeHandler);
                field.dispatchEvent(new Event('input'));
              });

              form.addEventListener('submit', function() {
                return validate(fields);
              });
            }
        </script>
    ";
        return; yield '';
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  259 => 68,  255 => 67,  247 => 47,  242 => 45,  239 => 44,  233 => 43,  224 => 40,  218 => 38,  213 => 37,  208 => 36,  205 => 35,  201 => 34,  194 => 28,  189 => 27,  185 => 26,  167 => 54,  163 => 53,  157 => 49,  155 => 47,  152 => 46,  150 => 34,  145 => 31,  143 => 26,  141 => 25,  136 => 21,  132 => 20,  125 => 17,  118 => 12,  113 => 11,  109 => 10,  101 => 6,  96 => 14,  94 => 10,  90 => 8,  88 => 6,  85 => 5,  81 => 4,  74 => 101,  72 => 67,  68 => 65,  66 => 20,  60 => 17,  54 => 15,  52 => 4,  47 => 1,);
    }

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