<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>My MPP - {% block title %}Start{% endblock %}</title>
        {# Run `composer require symfony/webpack-encore-bundle`
           and uncomment the following Encore helpers to start using Symfony UX #}
        {% block stylesheets %}
            {#{{ encore_entry_link_tags('app') }}#}
            <link rel="stylesheet" href="/assets/scss/styles.css?v=0001" />
        {% endblock %}

        {% block javascripts %}
            {#{{ encore_entry_script_tags('app') }}#}
            <script src="/assets/js/jquery-3.6.0.min.js"></script>
            <script src="/assets/js/jquery.serializeObject.js"></script>
            <script src="/assets/js/mpp-tool.js"></script>
        {% endblock %}
    </head>
    <body>
        <div id="wrapper">
            <div class="inner">
                <div id="message"></div>
                <header id="header">
                    <div class="inside">
                        <div class="logo">
                            <a href="https://www.realfm.de/" target="_blank"><img src="/assets/images/logos/real-fm.png" alt="My MPP" /></a>
                            <a href="/" class="home">Home</a>
                        </div>
                        {% block header %}
                            {% if app.user %}
                                <div class="status">
                                    Willkommen {{ app.user.firstname }} {{ app.user.lastname }}. <a href="{{ path('app_logout') }}">Logout</a>
                                </div>
                            {% else %}
                                <a href="https://www.realfm.de/produkt-kategorie/leitfaeden/" target="_blank">
                                    <button class="btn" style="text-transform: none; background-color: #6D0507; font-weight: bold">Zugang zum MPP-Tool erwerben</button>
                                </a>
                                <form method="post" class="form">
                                    {% if error %}
                                        <div class="alert">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
                                    {% endif %}
    
                                    {% if app.user %}
                                        <div class="mb-3">
                                            Sie sind als {{ app.user.username }} eingelogged, <a href="{{ path('app_logout') }}">Logout</a>
                                        </div>
                                    {% endif %}
    
                                    <div class="form--row">
                                        <div class="form--wrapper">
                                            <label for="inputEmail">E-Mail Adresse</label>
                                            <input type="email" value="{{ last_username }}" name="email" id="inputEmail" required autofocus />
                                        </div>
                                        <div class="form--wrapper">
                                            <label for="inputPassword">Passwort</label>
                                            <input type="password" name="password" id="inputPassword" required />
                                        </div>
                                        <div class="form--wrapper fw--no-width">
                                            <button class="btn " type="submit">Login</button>
                                        </div>
                                    </div>
    
                                    <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
    
                                    {#
                                    Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
                                    See https://symfony.com/doc/current/security/remember_me.html
                            
                                    <div class="checkbox mb-3">
                                        <label>
                                            <input type="checkbox" name="_remember_me"> Remember me
                                        </label>
                                    </div>
                                    #}
                                </form>
                            {% endif %}
                        {% endblock %}
                    </div>
                </header>
                <section id="main">
                    <div class="inside">
                        {% block body %}{% endblock %}
                    </div>
                </section>
                <footer id="footer">
                    <div class="inside">
                        <ul>
                            <li>
                                <a href="{{ path('privacy') }}">Datenschutz</a>
                            </li>
                            <li>
                                <a href="https://www.realfm.de/impressum/">Impressum</a>
                            </li>
                        </ul>
                    </div>
                </footer>
            </div>
        </div>
    </body>
</html>
