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

<section class="space-y-6 max-w-2xl">
    <div class="card">
        <div class="card-header">
            <h2 class="card-title">@ViewData["Title"]</h2>
        </div>

        <div class="card-content space-y-6">
            <div class="alert-destructive">
                <lucideicon name="alert-circle" class="h-4 w-4" />
                <div>
                    <div class="alert-title">@Localizer["Alert"]</div>
                </div>
            </div>

            <form id="delete-user" method="post" class="space-y-4">
                @await Html.PartialAsync("_ValidationSummary")

                @if (Model.RequirePassword)
                {
                    <div class="form-item">
                        <label asp-for="Password" class="form-label">
                            <lucideicon name="lock" class="inline-block h-4 w-4 mr-1" />
                            @Localizer["Password"]
                        </label>
                        <input asp-for="Password" type="password" class="input" tw-validation />
                        <span asp-validation-for="Password" class="form-message"></span>
                    </div>
                }
                <button class="btn-destructive" type="submit">
                    <lucideicon name="trash-2" class="inline-block h-4 w-4 mr-2" />
                    @Localizer["Delete"]
                </button>
            </form>
        </div>
    </div>
</section>
