import 'package:dartz/dartz.dart';
import 'package:injectable/injectable.dart';
import '../../../../../core/errors/failures.dart';
import '../../../../../core/usecases/usecase.dart';
import '../entities/ico_token_type_entity.dart';
import '../repositories/ico_repository.dart';

@injectable
class GetIcoTokenTypesUseCase
    implements UseCase<List<IcoTokenTypeEntity>, NoParams> {
  const GetIcoTokenTypesUseCase(this._repository);

  final IcoRepository _repository;

  @override
  Future<Either<Failure, List<IcoTokenTypeEntity>>> call(
      NoParams params) async {
    return await _repository.getTokenTypes();
  }
}
