@model Watcher.ViewModels.LoginViewModel
@{
    Layout = "~/Views/Shared/_LoginLayout.cshtml";
    ViewData["Title"] = "Login";
    var oidc = ViewBag.oidc;
}

<head>
    <link rel="stylesheet" href="~/css/main.css" />
    <link rel="stylesheet" href="~/css/Login.css" />
</head>

<div class="login-card">
    <h2 class="text-center mb-4">Anmelden</h2>

    <form asp-controller="Auth" asp-action="Login" method="post">
        <input type="hidden" asp-for="ReturnUrl" />

        <div class="mb-3">
            <label asp-for="Username" class="form-label">Benutzername</label>
            <input asp-for="Username" class="form-control" placeholder="admin" />
            <span asp-validation-for="Username" class="form-error"></span>
        </div>

        <div class="mb-3">
            <label asp-for="Password" class="form-label">Passwort</label>
            <input asp-for="Password" type="password" class="form-control" placeholder="••••••••" />
            <span asp-validation-for="Password" class="form-error"></span>
        </div>

        <div class="d-grid gap-2">
            <button type="submit" class="btn btn-primary">Login</button>
        </div>
    </form>

    <hr class="my-4" />

    @if (ViewBag.oidc == true)
    {
        <form asp-controller="Auth" asp-action="SignIn" method="get">
            <div class="d-grid gap-2">
                <button type="submit" class="btn btn-pocketid">Mit PocketID anmelden</button>
            </div>
        </form>
    }

</div>
