@page "/login"
@using System.IdentityModel.Tokens.Jwt;
@using System.Security.Claims;
@using BlazorAnimation
@using Newtonsoft.Json.Linq;
@using System.Text.Json;
@using System.Reflection;
@using TIAMWebApp.Shared.Application.Interfaces;
@using TIAMWebApp.Shared.Application.Models.PageModels;
@using TIAMSharedUI.Pages.Components;
@using TIAMWebApp.Shared.Application.Models.ClientSide;
@using TIAMWebApp.Shared.Application.Models;
@using TIAMWebApp.Shared.Application.Utility;
@using AyCode.Interfaces.StorageHandlers;


<PageTitle>Login</PageTitle>

<div class="text-center m-5">
    <h1>Login</h1>
    <h2 style="font-size:small">Good to see you again!</h2>
    </div>


<div class="container mt-3">
    <div class="row d-flex justify-content-center align-items-center h-100">
        <div class="col-12 col-sm-6 px-5">
            <Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
            <div class="card glass inputwizardwrapper my-5">

                <div class="wrapper">
                    <div class="my-logo">
                        <img src="_content/TIAMSharedUI/images/png-logo-0.png" alt="">
                    </div>
                    <div class="text-center mt-4 name">
                        @localizer["LoginTitleText"]
                    </div>
                    <form class="p-3 mt-3">
                        <div>
                            @switch (currentStep)
                            {
                                case 1:
                                    <LoginStep1 @bind-LoginModel="loginModel" onLoginNext="GoToNextStep" />
                                    ;
                                    break;

                                case 2:
                                    <LoginStep3 @bind-LoginModel="loginModel" onSubmit="SubmitLogin" onPrev="GoToPreviousStep" />
                                    ;
                                    break;
                            }
                        </div>


                    </form>
                    <p>@currentStep</p>
                    @{
                        if (!loggedIn)
                        {

                            <div>

                                <p>@localizer["LoginEmail"]: @loginModel.Email</p>

                                <p>@loginModel.Password</p>
                            </div>
                        }
                    }
                    <div class="text-center fs-6">
                        No account yet? <a href="register">Sign up here!</a>
                    </div>
                </div>
            </div>
            </Animation>
        </div>
        <div class="col-12 col-sm-6 px-5">
            <Animation Effect="@Effect.FadeInUp" Speed="@Speed.Fast" Delay="@TimeSpan.FromMilliseconds(250)">
                <p>
                    @*Add lorem ipsum 1 paragraph*@
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

                </p>
            </Animation>
        </div>
    </div>
</div>

@code {
    LoginModel loginModel = new LoginModel("test@test", "test1234");


}