part of 'checkout_form_bloc.dart';

@freezed
class CheckoutFormEvent with _$CheckoutFormEvent {
  const factory CheckoutFormEvent.started(List<ProductQuantity> items) =
      _Started;

  const factory CheckoutFormEvent.addItem(
    Product product,
    ProductVariant? variant,
  ) = _AddItem;

  const factory CheckoutFormEvent.removeItem(
    Product product,
    ProductVariant? variant,
  ) = _RemoveItem;

  const factory CheckoutFormEvent.updateItemNotes(
    Product product,
    String notes,
  ) = _UpdateItemNotes;

  const factory CheckoutFormEvent.updateOrderType(OrderType orderType) =
      _UpdateOrderType;

  const factory CheckoutFormEvent.updateDelivery(Delivery delivery) =
      _UpdateDelivery;

  const factory CheckoutFormEvent.updateTable(Table? table) = _UpdateTable;

  const factory CheckoutFormEvent.orderAddedItems(Order? order) =
      _OrderAddedItems;
    const factory CheckoutFormEvent.customerNameChanged(String name) =
      _CustomerNameChanged;
}
