using ERPCore.Dtos.Auth;
using ERPCore.Infra.Auth.AuthHex;
using ERPCore.Services.Interfaces;

namespace ERPCore.Services.Auth;

/// <inheritdoc cref="IAuthRecoveryService"/>
public sealed class AuthRecoveryService : IAuthRecoveryService
{
    private readonly IAuthHexClient _authHex;

    public AuthRecoveryService(IAuthHexClient authHex) => _authHex = authHex;

    public Task<ForgotPasswordResponse> ForgotPasswordAsync(ForgotPasswordRequest request, CancellationToken ct = default)
        => _authHex.ForgotPasswordAsync(request, ct);

    public Task<VerifyRecoveryOtpResponse> VerifyOtpAsync(VerifyRecoveryOtpRequest request, CancellationToken ct = default)
        => _authHex.VerifyRecoveryOtpAsync(request, ct);

    public Task ResetPasswordAsync(ResetPasswordRequest request, CancellationToken ct = default)
        => _authHex.ResetPasswordAsync(request, ct);

    public Task ResetPasswordWithTokenAsync(ResetPasswordWithTokenRequest request, CancellationToken ct = default)
        => _authHex.ResetPasswordWithTokenAsync(request, ct);
}
