import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../repositories/client_create_order_repository_interface.dart';

/// Use case for retrieving the available order types for a client.
///
/// This use case fetches the list of supported staffing order types
/// from the [ClientCreateOrderRepositoryInterface].
class GetOrderTypesUseCase implements NoInputUseCase<List<OrderType>> {
  /// Creates a [GetOrderTypesUseCase].
  ///
  /// Requires a [ClientCreateOrderRepositoryInterface] to interact with the data layer.
  const GetOrderTypesUseCase(this._repository);
  final ClientCreateOrderRepositoryInterface _repository;

  @override
  Future<List<OrderType>> call() {
    return _repository.getOrderTypes();
  }
}
