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

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

        <div class="card-content space-y-6">
            @await Html.PartialAsync("_ValidationSummary")
            @await Html.PartialAsync("_StatusMessage", Model.StatusMessage)

            <form method="post" class="space-y-4">
                <div class="form-item">
                    <label asp-for="OldPassword" class="form-label">
                        <lucideicon name="lock" class="inline-block h-4 w-4 mr-1" />
                        @Localizer["OldPassword"]
                    </label>
                    <input asp-for="OldPassword" type="password" class="input" tw-validation />
                    <span asp-validation-for="OldPassword" class="form-message"></span>
                </div>

                <div class="form-item">
                    <label asp-for="NewPassword" class="form-label">
                        <lucideicon name="key-round" class="inline-block h-4 w-4 mr-1" />
                        @Localizer["NewPassword"]
                    </label>
                    <input asp-for="NewPassword" type="password" class="input" tw-validation />
                    <span asp-validation-for="NewPassword" class="form-message"></span>
                </div>

                <div class="form-item">
                    <label asp-for="ConfirmPassword" class="form-label">
                        <lucideicon name="lock-keyhole" class="inline-block h-4 w-4 mr-1" />
                        @Localizer["ConfirmPassword"]
                    </label>
                    <input asp-for="ConfirmPassword" type="password" class="input" tw-validation />
                    <span asp-validation-for="ConfirmPassword" class="form-message"></span>
                </div>

                <div>
                    <button type="submit" class="btn-default">
                        <lucideicon name="save" class="inline-block h-4 w-4 mr-2" />
                        @Localizer["Update"]
                    </button>
                </div>
            </form>
        </div>
    </div>
</section>