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

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

class SignUpUseCase extends UseCase<SignUpResponse, SignUpRequest> {
  final AuthRepository repository;

  SignUpUseCase(this.repository);

  @override
  Future<Either<Failure, SignUpResponse>> call(SignUpRequest params) async {
    final response = await repository.signUp(params);
    return response;
  }
}
