part of 'checkout_form_bloc.dart';

@freezed
class CheckoutFormState with _$CheckoutFormState {
  factory CheckoutFormState({
    Order? orderAdded,
    required List<ProductQuantity> items,
    required int discount,
    required int discountAmount,
    required int tax,
    required int serviceCharge,
    required int totalQuantity,
    required int totalPrice,
    required String draftName,
    required OrderType orderType,
    required String customerName,
    Delivery? delivery,
    Table? table,
    @Default(false) bool isLoading,
  }) = _CheckoutFormState;

  factory CheckoutFormState.initial() => CheckoutFormState(
    items: [],
    discount: 0,
    discountAmount: 0,
    tax: 0,
    serviceCharge: 0,
    totalQuantity: 0,
    totalPrice: 0,
    draftName: '',
     customerName: '',
    orderType: OrderType.dineIn,
  );
}
