@inject HttpClient Http
@inject NavigationManager NavigationManager

<div class="p-4 mb-4 mx-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">
    <h3 class="mb-2 text-lg font-medium text-gray-900 dark:text-white">Change master password</h3>

    <div class="mb-3 text-sm text-gray-600 dark:text-gray-400">Changing your master password also changes the vault encryption keys. It is advised to periodically change your master password to keep your vaults secure.</div>

    <Button OnClick="ChangePassword">Change Password</Button>
</div>

@code {
    /// <summary>
    /// Gets or sets a value indicating whether Two-Factor Authentication is enabled.
    /// </summary>
    [Parameter]
    public bool TwoFactorEnabled { get; set; }

    /// <summary>
    /// Event callback that is invoked when the Two-Factor Authentication status changes.
    /// </summary>
    [Parameter]
    public EventCallback OnStatusChanged { get; set; }

    private bool IsLoading { get; set; } = true;

    /// <summary>
    /// Navigates to the change password page.
    /// </summary>
    private void ChangePassword()
    {
        NavigationManager.NavigateTo("settings/security/change-password");
    }
}
