import '../domain/order_action_result.dart';
import '../domain/order_status.dart';
import '../domain/orders_repository.dart';

/// Use case: update the status of an order.
class UpdateOrderStatus {
  final OrdersRepository repository;

  UpdateOrderStatus(this.repository);

  Future<OrderActionResult> call(String id, OrderStatus newStatus) =>
      repository.updateOrderStatus(id, newStatus);
}
