import 'package:cargocalculaterapp/core/error/failure.dart';
import 'package:cargocalculaterapp/core/usecase/usecase.dart';
import 'package:cargocalculaterapp/features/auth/data/model/auth_verification_request.dart';
import 'package:cargocalculaterapp/features/auth/data/model/auth_verification_response.dart';
import 'package:dartz/dartz.dart';

import '../repository/auth_repository.dart';

class VerifyPhoneUseCase
    extends UseCase<AuthVerificationResponse, AuthVerificationRequest> {
  final AuthRepository repository;

  VerifyPhoneUseCase(this.repository);

  @override
  Future<Either<Failure, AuthVerificationResponse>> call(
    AuthVerificationRequest params,
  ) async {
    final response = await repository.verify(params);
    return response;
  }
}
