using FruitBank.Common.Services;

namespace FruitBankHybrid.Web.Services;


/// <summary>
/// Server-side implementation of ISecureCredentialService.
/// This is a no-op implementation used during prerendering - actual credential storage
/// is handled by the client-side WebSecureCredentialService after WebAssembly loads.
/// </summary>
public sealed class ServerSecureCredentialService : ISecureCredentialService
{
    public Task SaveCredentialsAsync(string email, string password)
    {
        // No-op on server side - credentials are stored client-side
        return Task.CompletedTask;
    }

    public Task<StoredCredentials?> GetCredentialsAsync()
    {
        // Always return null on server side - auto-login happens client-side after WASM loads
        return Task.FromResult<StoredCredentials?>(null);
    }

    public Task ClearCredentialsAsync()
    {
        // No-op on server side
        return Task.CompletedTask;
    }
}
