part of 'order_form_bloc.dart';

@freezed
class OrderFormEvent with _$OrderFormEvent {
  const factory OrderFormEvent.started(Order order) = _Started;
  const factory OrderFormEvent.create({
    required List<ProductQuantity> items,
    required String customerName,
    required Customer? customer,
    required OrderType orderType,
    required TableModel? table,
  }) = _Create;
  const factory OrderFormEvent.createWithPayment({
    required List<ProductQuantity> items,
    required String customerName,
    required Customer? customer,
    required OrderType orderType,
    required TableModel? table,
    required PaymentMethod paymentMethod,
  }) = _CreateWithPaymentMethod;
  const factory OrderFormEvent.addToOrder({
    required List<ProductQuantity> items,
    required String orderId,
  }) = _AddToOrder;
  const factory OrderFormEvent.refund({
    required List<OrderItem> items,
    required String orderId,
    required String reason,
  }) = _Refund;
  const factory OrderFormEvent.voidOrder({
    required List<OrderItem> items,
    required String orderId,
    required String reason,
  }) = _VoidOrder;
  const factory OrderFormEvent.toggleItem(OrderItem item) = _ToggleItem;
  const factory OrderFormEvent.toggleSelectAll(bool selectAll) =
      _ToggleSelectAll;
}
