@inject IViewLocalizer Localizer
@using Microsoft.AspNetCore.Mvc.Localization
@model LiteCharmsSecurity.STS.Identity.ViewModels.Account.ExternalLoginConfirmationViewModel
@{
    ViewData["Title"] = Localizer["Title"];
}

<div class="py-8">
    <h1 class="text-4xl font-bold mb-2">@ViewData["Title"]</h1>
    <h2 class="text-2xl text-muted-foreground mb-6">@Localizer["SubTitle", ViewData["LoginProvider"]]</h2>

    @await Html.PartialAsync("_ValidationSummary")
    
    <div class="alert-default">
        <lucideicon name="info" class="h-4 w-4" />
        <div>
            <div class="alert-description">
                @Localizer["Info", ViewData["LoginProvider"]]
            </div>
        </div>
    </div>

    <div class="card">
        <div class="card-content">
            <form asp-controller="Account" asp-action="ExternalLoginConfirmation" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="space-y-6">
                <div class="form-item">
                    <label asp-for="UserName" class="form-label">
                        <lucideicon name="user" class="inline-block h-4 w-4 mr-1" />
                        @Localizer["UserName"]
                    </label>
                    <input asp-for="UserName" class="input" tw-validation />
                    <span asp-validation-for="UserName" class="form-message"></span>
                </div>
                <div class="form-item">
                    <label asp-for="Email" class="form-label">
                        <lucideicon name="mail" class="inline-block h-4 w-4 mr-1" />
                        @Localizer["Email"]
                    </label>
                    <input asp-for="Email" class="input" tw-validation />
                    <span asp-validation-for="Email" class="form-message"></span>
                </div>
                <div>
                    <button type="submit" class="btn-default">
                        <lucideicon name="user-plus" class="inline-block h-4 w-4 mr-2" />
                        @Localizer["Register"]
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>