@page "/user/forgot-password"
@attribute [AllowAnonymous]
@layout Auth.Layout.MainLayout
@inject Config Config
@inject IStringLocalizerFactory LocalizerFactory
@using Microsoft.Extensions.Localization

<h2 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">
    @Localizer["LostPasswordTitle"]
</h2>
<div class="text-sm space-y-4 text-gray-500 dark:text-gray-400">
    <p>
        @Localizer["NoRecoveryExplanation"]
    </p>
    <p>
        @Localizer["NewAccountRequired"]
    </p>
    <div>
        <h3 class="font-medium mb-2 text-gray-900 dark:text-white">@Localizer["RecentlyChangedPasswordTitle"]</h3>
        @if (!string.IsNullOrEmpty(Config.SupportEmail))
        {
            <p>@((MarkupString)string.Format(Localizer["ContactSupportWithEmail"], $"<a href=\"mailto:{Config.SupportEmail}\" class=\"text-blue-600 hover:underline\">{Config.SupportEmail}</a>"))</p>
        }
        else
        {
            <p>@Localizer["ContactAdministrator"]</p>
        }
    </div>
</div>

@code {
    private IStringLocalizer Localizer => LocalizerFactory.Create("Pages.Auth.ForgotPassword", "AliasVault.Client");

    /// <inheritdoc />
    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();
    }
}
