import 'package:dartz/dartz.dart';

import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
import 'package:food_delivery_client/food_delivery_client.dart';

import '../../../../core/usecase/usecase.dart';

@injectable
class VerifyOtpCodeForgotPasswordUseCase
    implements UseCase<SuccessModel, VerifyOtpCodeParams> {
  final AuthRepository _authRepository;

  VerifyOtpCodeForgotPasswordUseCase(this._authRepository);

  @override
  Future<Either<Failure, SuccessModel>> call(VerifyOtpCodeParams params) async {
    return _authRepository.verifyOtpCodeResetPassword(params: params);
  }
}

class VerifyOtpCodeParams {
  final String otpCode;
  final String phoneNumber;

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

class OtpCodePageParams {
  final String phoneNumber;
  final bool isRegister;

  OtpCodePageParams({required this.phoneNumber, required this.isRegister});
}
