import 'package:auth/src/core/domain/repositories/auth_repository.dart';
import 'package:auth/src/features/recover_password/domain/use_cases/recover_password_use_case.dart';

class RecoverPasswordUseCaseImpl implements RecoverPasswordUseCase {
  RecoverPasswordUseCaseImpl(this._repository);

  final AuthRepository _repository;

  @override
  Future<String> requestEmail({required String email}) async {
    return await _repository.requestPasswordReset(email: email);
  }

  @override
  Future<String> requestSms({required String phone}) async {
    return await _repository.requestPasswordReset(phone: phone);
  }

  @override
  Future<void> recoverPassword({required String newPassword, required String token}) async {
    await _repository.recoverPassword(newPassword: newPassword, token: token);
  }
}
