part of 'order_form_bloc.dart';

@freezed
class OrderFormEvent with _$OrderFormEvent {
  const factory OrderFormEvent.customerNameChanged(String customerName) =
      _CustomerNameChanged;
  const factory OrderFormEvent.paymentMethodChanged(PaymentMethod payment) =
      _PaymentMethodChanged;
  const factory OrderFormEvent.customerChanged(Customer? customer) =
      _CustomerChanged;
  const factory OrderFormEvent.createOrderWithPayment({
    required List<ProductQuantity> items,
    required OrderType orderType,
    Table? table,
  }) = _CreateOrderWithPayment;

  const factory OrderFormEvent.createOrder({
    required List<ProductQuantity> items,
    required OrderType orderType,
    Table? table,
  }) = _CreateOrder;

  const factory OrderFormEvent.addItemOrder({
    required String orderId,
    required List<ProductQuantity> items,
  }) = _AddItemOrder;
}
