import 'package:cargocalculaterapp/core/error/failure.dart';
import 'package:cargocalculaterapp/core/usecase/usecase.dart';
import 'package:cargocalculaterapp/features/home/data/models/orders_list_response.dart';
import 'package:cargocalculaterapp/features/home/domain/repository/home_repository.dart';
import 'package:dartz/dartz.dart';

class OrdersListUseCase
    extends UseCase<OrdersListResponse, Map<String, dynamic>> {
  final HomeRepository repository;

  OrdersListUseCase(this.repository);

  @override
  Future<Either<Failure, OrdersListResponse>> call(
    Map<String, dynamic> params,
  ) async {
    return await repository.ordersList(params);
  }
}
