import '../../../../core/usecases/usecase.dart';
import '../repositories/auth_repository.dart';

class VerifyOTP implements UseCase<bool, VerifyOTPParams> {
  final AuthRepository repository;

  VerifyOTP(this.repository);

  @override
  Future<Result<bool>> call(VerifyOTPParams params) async {
    return await repository.verifyOTP(params.otpCode, params.phoneNumber);
  }
}

class VerifyOTPParams {
  final String otpCode;
  final String phoneNumber;

  VerifyOTPParams({
    required this.otpCode,
    required this.phoneNumber,
  });
}
