import 'package:dartz/dartz.dart';
import 'package:food_delivery_client/core/exceptions/failure.dart';
import 'package:food_delivery_client/feature/auth/domain/repository/auth_repository.dart';
import 'package:food_delivery_client/feature/common/common.dart';
import 'package:food_delivery_client/food_delivery_client.dart';

import '../../../../core/usecase/usecase.dart';
@injectable
class RegisterUseCase implements UseCase<SuccessModel, RegisterParams> {
  final AuthRepository _authRepository;

  RegisterUseCase(this._authRepository);

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

class RegisterParams {
  final String firstName;
  final String lastName;
  final String phoneNumber;
  final String password;

  RegisterParams({
    required this.firstName,
    required this.lastName,
    required this.phoneNumber,
    required this.password,
  });
}
