// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark

part of 'checkout_form_bloc.dart';

// **************************************************************************
// FreezedGenerator
// **************************************************************************

T _$identity<T>(T value) => value;

final _privateConstructorUsedError = UnsupportedError(
  'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);

/// @nodoc
mixin _$CheckoutFormEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CheckoutFormEventCopyWith<$Res> {
  factory $CheckoutFormEventCopyWith(
    CheckoutFormEvent value,
    $Res Function(CheckoutFormEvent) then,
  ) = _$CheckoutFormEventCopyWithImpl<$Res, CheckoutFormEvent>;
}

/// @nodoc
class _$CheckoutFormEventCopyWithImpl<$Res, $Val extends CheckoutFormEvent>
    implements $CheckoutFormEventCopyWith<$Res> {
  _$CheckoutFormEventCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
}

/// @nodoc
abstract class _$$StartedImplCopyWith<$Res> {
  factory _$$StartedImplCopyWith(
    _$StartedImpl value,
    $Res Function(_$StartedImpl) then,
  ) = __$$StartedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({List<ProductQuantity> items});
}

/// @nodoc
class __$$StartedImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$StartedImpl>
    implements _$$StartedImplCopyWith<$Res> {
  __$$StartedImplCopyWithImpl(
    _$StartedImpl _value,
    $Res Function(_$StartedImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? items = null}) {
    return _then(
      _$StartedImpl(
        null == items
            ? _value._items
            : items // ignore: cast_nullable_to_non_nullable
                  as List<ProductQuantity>,
      ),
    );
  }
}

/// @nodoc

class _$StartedImpl implements _Started {
  const _$StartedImpl(final List<ProductQuantity> items) : _items = items;

  final List<ProductQuantity> _items;
  @override
  List<ProductQuantity> get items {
    if (_items is EqualUnmodifiableListView) return _items;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_items);
  }

  @override
  String toString() {
    return 'CheckoutFormEvent.started(items: $items)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$StartedImpl &&
            const DeepCollectionEquality().equals(other._items, _items));
  }

  @override
  int get hashCode =>
      Object.hash(runtimeType, const DeepCollectionEquality().hash(_items));

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$StartedImplCopyWith<_$StartedImpl> get copyWith =>
      __$$StartedImplCopyWithImpl<_$StartedImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return started(items);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return started?.call(items);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (started != null) {
      return started(items);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return started(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return started?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (started != null) {
      return started(this);
    }
    return orElse();
  }
}

abstract class _Started implements CheckoutFormEvent {
  const factory _Started(final List<ProductQuantity> items) = _$StartedImpl;

  List<ProductQuantity> get items;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$StartedImplCopyWith<_$StartedImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$AddItemImplCopyWith<$Res> {
  factory _$$AddItemImplCopyWith(
    _$AddItemImpl value,
    $Res Function(_$AddItemImpl) then,
  ) = __$$AddItemImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Product product, ProductVariant? variant});

  $ProductCopyWith<$Res> get product;
  $ProductVariantCopyWith<$Res>? get variant;
}

/// @nodoc
class __$$AddItemImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$AddItemImpl>
    implements _$$AddItemImplCopyWith<$Res> {
  __$$AddItemImplCopyWithImpl(
    _$AddItemImpl _value,
    $Res Function(_$AddItemImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? product = null, Object? variant = freezed}) {
    return _then(
      _$AddItemImpl(
        null == product
            ? _value.product
            : product // ignore: cast_nullable_to_non_nullable
                  as Product,
        freezed == variant
            ? _value.variant
            : variant // ignore: cast_nullable_to_non_nullable
                  as ProductVariant?,
      ),
    );
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ProductCopyWith<$Res> get product {
    return $ProductCopyWith<$Res>(_value.product, (value) {
      return _then(_value.copyWith(product: value));
    });
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ProductVariantCopyWith<$Res>? get variant {
    if (_value.variant == null) {
      return null;
    }

    return $ProductVariantCopyWith<$Res>(_value.variant!, (value) {
      return _then(_value.copyWith(variant: value));
    });
  }
}

/// @nodoc

class _$AddItemImpl implements _AddItem {
  const _$AddItemImpl(this.product, this.variant);

  @override
  final Product product;
  @override
  final ProductVariant? variant;

  @override
  String toString() {
    return 'CheckoutFormEvent.addItem(product: $product, variant: $variant)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$AddItemImpl &&
            (identical(other.product, product) || other.product == product) &&
            (identical(other.variant, variant) || other.variant == variant));
  }

  @override
  int get hashCode => Object.hash(runtimeType, product, variant);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$AddItemImplCopyWith<_$AddItemImpl> get copyWith =>
      __$$AddItemImplCopyWithImpl<_$AddItemImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return addItem(product, variant);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return addItem?.call(product, variant);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (addItem != null) {
      return addItem(product, variant);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return addItem(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return addItem?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (addItem != null) {
      return addItem(this);
    }
    return orElse();
  }
}

abstract class _AddItem implements CheckoutFormEvent {
  const factory _AddItem(final Product product, final ProductVariant? variant) =
      _$AddItemImpl;

  Product get product;
  ProductVariant? get variant;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$AddItemImplCopyWith<_$AddItemImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$RemoveItemImplCopyWith<$Res> {
  factory _$$RemoveItemImplCopyWith(
    _$RemoveItemImpl value,
    $Res Function(_$RemoveItemImpl) then,
  ) = __$$RemoveItemImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Product product, ProductVariant? variant});

  $ProductCopyWith<$Res> get product;
  $ProductVariantCopyWith<$Res>? get variant;
}

/// @nodoc
class __$$RemoveItemImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$RemoveItemImpl>
    implements _$$RemoveItemImplCopyWith<$Res> {
  __$$RemoveItemImplCopyWithImpl(
    _$RemoveItemImpl _value,
    $Res Function(_$RemoveItemImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? product = null, Object? variant = freezed}) {
    return _then(
      _$RemoveItemImpl(
        null == product
            ? _value.product
            : product // ignore: cast_nullable_to_non_nullable
                  as Product,
        freezed == variant
            ? _value.variant
            : variant // ignore: cast_nullable_to_non_nullable
                  as ProductVariant?,
      ),
    );
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ProductCopyWith<$Res> get product {
    return $ProductCopyWith<$Res>(_value.product, (value) {
      return _then(_value.copyWith(product: value));
    });
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ProductVariantCopyWith<$Res>? get variant {
    if (_value.variant == null) {
      return null;
    }

    return $ProductVariantCopyWith<$Res>(_value.variant!, (value) {
      return _then(_value.copyWith(variant: value));
    });
  }
}

/// @nodoc

class _$RemoveItemImpl implements _RemoveItem {
  const _$RemoveItemImpl(this.product, this.variant);

  @override
  final Product product;
  @override
  final ProductVariant? variant;

  @override
  String toString() {
    return 'CheckoutFormEvent.removeItem(product: $product, variant: $variant)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$RemoveItemImpl &&
            (identical(other.product, product) || other.product == product) &&
            (identical(other.variant, variant) || other.variant == variant));
  }

  @override
  int get hashCode => Object.hash(runtimeType, product, variant);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$RemoveItemImplCopyWith<_$RemoveItemImpl> get copyWith =>
      __$$RemoveItemImplCopyWithImpl<_$RemoveItemImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return removeItem(product, variant);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return removeItem?.call(product, variant);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (removeItem != null) {
      return removeItem(product, variant);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return removeItem(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return removeItem?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (removeItem != null) {
      return removeItem(this);
    }
    return orElse();
  }
}

abstract class _RemoveItem implements CheckoutFormEvent {
  const factory _RemoveItem(
    final Product product,
    final ProductVariant? variant,
  ) = _$RemoveItemImpl;

  Product get product;
  ProductVariant? get variant;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$RemoveItemImplCopyWith<_$RemoveItemImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$UpdateItemNotesImplCopyWith<$Res> {
  factory _$$UpdateItemNotesImplCopyWith(
    _$UpdateItemNotesImpl value,
    $Res Function(_$UpdateItemNotesImpl) then,
  ) = __$$UpdateItemNotesImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Product product, String notes});

  $ProductCopyWith<$Res> get product;
}

/// @nodoc
class __$$UpdateItemNotesImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$UpdateItemNotesImpl>
    implements _$$UpdateItemNotesImplCopyWith<$Res> {
  __$$UpdateItemNotesImplCopyWithImpl(
    _$UpdateItemNotesImpl _value,
    $Res Function(_$UpdateItemNotesImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? product = null, Object? notes = null}) {
    return _then(
      _$UpdateItemNotesImpl(
        null == product
            ? _value.product
            : product // ignore: cast_nullable_to_non_nullable
                  as Product,
        null == notes
            ? _value.notes
            : notes // ignore: cast_nullable_to_non_nullable
                  as String,
      ),
    );
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $ProductCopyWith<$Res> get product {
    return $ProductCopyWith<$Res>(_value.product, (value) {
      return _then(_value.copyWith(product: value));
    });
  }
}

/// @nodoc

class _$UpdateItemNotesImpl implements _UpdateItemNotes {
  const _$UpdateItemNotesImpl(this.product, this.notes);

  @override
  final Product product;
  @override
  final String notes;

  @override
  String toString() {
    return 'CheckoutFormEvent.updateItemNotes(product: $product, notes: $notes)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$UpdateItemNotesImpl &&
            (identical(other.product, product) || other.product == product) &&
            (identical(other.notes, notes) || other.notes == notes));
  }

  @override
  int get hashCode => Object.hash(runtimeType, product, notes);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$UpdateItemNotesImplCopyWith<_$UpdateItemNotesImpl> get copyWith =>
      __$$UpdateItemNotesImplCopyWithImpl<_$UpdateItemNotesImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return updateItemNotes(product, notes);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return updateItemNotes?.call(product, notes);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateItemNotes != null) {
      return updateItemNotes(product, notes);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return updateItemNotes(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return updateItemNotes?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateItemNotes != null) {
      return updateItemNotes(this);
    }
    return orElse();
  }
}

abstract class _UpdateItemNotes implements CheckoutFormEvent {
  const factory _UpdateItemNotes(final Product product, final String notes) =
      _$UpdateItemNotesImpl;

  Product get product;
  String get notes;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$UpdateItemNotesImplCopyWith<_$UpdateItemNotesImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$UpdateOrderTypeImplCopyWith<$Res> {
  factory _$$UpdateOrderTypeImplCopyWith(
    _$UpdateOrderTypeImpl value,
    $Res Function(_$UpdateOrderTypeImpl) then,
  ) = __$$UpdateOrderTypeImplCopyWithImpl<$Res>;
  @useResult
  $Res call({OrderType orderType});
}

/// @nodoc
class __$$UpdateOrderTypeImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$UpdateOrderTypeImpl>
    implements _$$UpdateOrderTypeImplCopyWith<$Res> {
  __$$UpdateOrderTypeImplCopyWithImpl(
    _$UpdateOrderTypeImpl _value,
    $Res Function(_$UpdateOrderTypeImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? orderType = null}) {
    return _then(
      _$UpdateOrderTypeImpl(
        null == orderType
            ? _value.orderType
            : orderType // ignore: cast_nullable_to_non_nullable
                  as OrderType,
      ),
    );
  }
}

/// @nodoc

class _$UpdateOrderTypeImpl implements _UpdateOrderType {
  const _$UpdateOrderTypeImpl(this.orderType);

  @override
  final OrderType orderType;

  @override
  String toString() {
    return 'CheckoutFormEvent.updateOrderType(orderType: $orderType)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$UpdateOrderTypeImpl &&
            (identical(other.orderType, orderType) ||
                other.orderType == orderType));
  }

  @override
  int get hashCode => Object.hash(runtimeType, orderType);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$UpdateOrderTypeImplCopyWith<_$UpdateOrderTypeImpl> get copyWith =>
      __$$UpdateOrderTypeImplCopyWithImpl<_$UpdateOrderTypeImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return updateOrderType(orderType);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return updateOrderType?.call(orderType);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateOrderType != null) {
      return updateOrderType(orderType);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return updateOrderType(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return updateOrderType?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateOrderType != null) {
      return updateOrderType(this);
    }
    return orElse();
  }
}

abstract class _UpdateOrderType implements CheckoutFormEvent {
  const factory _UpdateOrderType(final OrderType orderType) =
      _$UpdateOrderTypeImpl;

  OrderType get orderType;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$UpdateOrderTypeImplCopyWith<_$UpdateOrderTypeImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$UpdateDeliveryImplCopyWith<$Res> {
  factory _$$UpdateDeliveryImplCopyWith(
    _$UpdateDeliveryImpl value,
    $Res Function(_$UpdateDeliveryImpl) then,
  ) = __$$UpdateDeliveryImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Delivery delivery});
}

/// @nodoc
class __$$UpdateDeliveryImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$UpdateDeliveryImpl>
    implements _$$UpdateDeliveryImplCopyWith<$Res> {
  __$$UpdateDeliveryImplCopyWithImpl(
    _$UpdateDeliveryImpl _value,
    $Res Function(_$UpdateDeliveryImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? delivery = null}) {
    return _then(
      _$UpdateDeliveryImpl(
        null == delivery
            ? _value.delivery
            : delivery // ignore: cast_nullable_to_non_nullable
                  as Delivery,
      ),
    );
  }
}

/// @nodoc

class _$UpdateDeliveryImpl implements _UpdateDelivery {
  const _$UpdateDeliveryImpl(this.delivery);

  @override
  final Delivery delivery;

  @override
  String toString() {
    return 'CheckoutFormEvent.updateDelivery(delivery: $delivery)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$UpdateDeliveryImpl &&
            (identical(other.delivery, delivery) ||
                other.delivery == delivery));
  }

  @override
  int get hashCode => Object.hash(runtimeType, delivery);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$UpdateDeliveryImplCopyWith<_$UpdateDeliveryImpl> get copyWith =>
      __$$UpdateDeliveryImplCopyWithImpl<_$UpdateDeliveryImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return updateDelivery(delivery);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return updateDelivery?.call(delivery);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateDelivery != null) {
      return updateDelivery(delivery);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return updateDelivery(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return updateDelivery?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateDelivery != null) {
      return updateDelivery(this);
    }
    return orElse();
  }
}

abstract class _UpdateDelivery implements CheckoutFormEvent {
  const factory _UpdateDelivery(final Delivery delivery) = _$UpdateDeliveryImpl;

  Delivery get delivery;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$UpdateDeliveryImplCopyWith<_$UpdateDeliveryImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$UpdateTableImplCopyWith<$Res> {
  factory _$$UpdateTableImplCopyWith(
    _$UpdateTableImpl value,
    $Res Function(_$UpdateTableImpl) then,
  ) = __$$UpdateTableImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Table? table});

  $TableCopyWith<$Res>? get table;
}

/// @nodoc
class __$$UpdateTableImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$UpdateTableImpl>
    implements _$$UpdateTableImplCopyWith<$Res> {
  __$$UpdateTableImplCopyWithImpl(
    _$UpdateTableImpl _value,
    $Res Function(_$UpdateTableImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? table = freezed}) {
    return _then(
      _$UpdateTableImpl(
        freezed == table
            ? _value.table
            : table // ignore: cast_nullable_to_non_nullable
                  as Table?,
      ),
    );
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $TableCopyWith<$Res>? get table {
    if (_value.table == null) {
      return null;
    }

    return $TableCopyWith<$Res>(_value.table!, (value) {
      return _then(_value.copyWith(table: value));
    });
  }
}

/// @nodoc

class _$UpdateTableImpl implements _UpdateTable {
  const _$UpdateTableImpl(this.table);

  @override
  final Table? table;

  @override
  String toString() {
    return 'CheckoutFormEvent.updateTable(table: $table)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$UpdateTableImpl &&
            (identical(other.table, table) || other.table == table));
  }

  @override
  int get hashCode => Object.hash(runtimeType, table);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$UpdateTableImplCopyWith<_$UpdateTableImpl> get copyWith =>
      __$$UpdateTableImplCopyWithImpl<_$UpdateTableImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return updateTable(table);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return updateTable?.call(table);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateTable != null) {
      return updateTable(table);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return updateTable(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return updateTable?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (updateTable != null) {
      return updateTable(this);
    }
    return orElse();
  }
}

abstract class _UpdateTable implements CheckoutFormEvent {
  const factory _UpdateTable(final Table? table) = _$UpdateTableImpl;

  Table? get table;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$UpdateTableImplCopyWith<_$UpdateTableImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$OrderAddedItemsImplCopyWith<$Res> {
  factory _$$OrderAddedItemsImplCopyWith(
    _$OrderAddedItemsImpl value,
    $Res Function(_$OrderAddedItemsImpl) then,
  ) = __$$OrderAddedItemsImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Order? order});

  $OrderCopyWith<$Res>? get order;
}

/// @nodoc
class __$$OrderAddedItemsImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$OrderAddedItemsImpl>
    implements _$$OrderAddedItemsImplCopyWith<$Res> {
  __$$OrderAddedItemsImplCopyWithImpl(
    _$OrderAddedItemsImpl _value,
    $Res Function(_$OrderAddedItemsImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? order = freezed}) {
    return _then(
      _$OrderAddedItemsImpl(
        freezed == order
            ? _value.order
            : order // ignore: cast_nullable_to_non_nullable
                  as Order?,
      ),
    );
  }

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $OrderCopyWith<$Res>? get order {
    if (_value.order == null) {
      return null;
    }

    return $OrderCopyWith<$Res>(_value.order!, (value) {
      return _then(_value.copyWith(order: value));
    });
  }
}

/// @nodoc

class _$OrderAddedItemsImpl implements _OrderAddedItems {
  const _$OrderAddedItemsImpl(this.order);

  @override
  final Order? order;

  @override
  String toString() {
    return 'CheckoutFormEvent.orderAddedItems(order: $order)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$OrderAddedItemsImpl &&
            (identical(other.order, order) || other.order == order));
  }

  @override
  int get hashCode => Object.hash(runtimeType, order);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$OrderAddedItemsImplCopyWith<_$OrderAddedItemsImpl> get copyWith =>
      __$$OrderAddedItemsImplCopyWithImpl<_$OrderAddedItemsImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return orderAddedItems(order);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return orderAddedItems?.call(order);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (orderAddedItems != null) {
      return orderAddedItems(order);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return orderAddedItems(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return orderAddedItems?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (orderAddedItems != null) {
      return orderAddedItems(this);
    }
    return orElse();
  }
}

abstract class _OrderAddedItems implements CheckoutFormEvent {
  const factory _OrderAddedItems(final Order? order) = _$OrderAddedItemsImpl;

  Order? get order;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$OrderAddedItemsImplCopyWith<_$OrderAddedItemsImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class _$$CustomerNameChangedImplCopyWith<$Res> {
  factory _$$CustomerNameChangedImplCopyWith(
    _$CustomerNameChangedImpl value,
    $Res Function(_$CustomerNameChangedImpl) then,
  ) = __$$CustomerNameChangedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String name});
}

/// @nodoc
class __$$CustomerNameChangedImplCopyWithImpl<$Res>
    extends _$CheckoutFormEventCopyWithImpl<$Res, _$CustomerNameChangedImpl>
    implements _$$CustomerNameChangedImplCopyWith<$Res> {
  __$$CustomerNameChangedImplCopyWithImpl(
    _$CustomerNameChangedImpl _value,
    $Res Function(_$CustomerNameChangedImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({Object? name = null}) {
    return _then(
      _$CustomerNameChangedImpl(
        null == name
            ? _value.name
            : name // ignore: cast_nullable_to_non_nullable
                  as String,
      ),
    );
  }
}

/// @nodoc

class _$CustomerNameChangedImpl implements _CustomerNameChanged {
  const _$CustomerNameChangedImpl(this.name);

  @override
  final String name;

  @override
  String toString() {
    return 'CheckoutFormEvent.customerNameChanged(name: $name)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$CustomerNameChangedImpl &&
            (identical(other.name, name) || other.name == name));
  }

  @override
  int get hashCode => Object.hash(runtimeType, name);

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$CustomerNameChangedImplCopyWith<_$CustomerNameChangedImpl> get copyWith =>
      __$$CustomerNameChangedImplCopyWithImpl<_$CustomerNameChangedImpl>(
        this,
        _$identity,
      );

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(List<ProductQuantity> items) started,
    required TResult Function(Product product, ProductVariant? variant) addItem,
    required TResult Function(Product product, ProductVariant? variant)
    removeItem,
    required TResult Function(Product product, String notes) updateItemNotes,
    required TResult Function(OrderType orderType) updateOrderType,
    required TResult Function(Delivery delivery) updateDelivery,
    required TResult Function(Table? table) updateTable,
    required TResult Function(Order? order) orderAddedItems,
    required TResult Function(String name) customerNameChanged,
  }) {
    return customerNameChanged(name);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(List<ProductQuantity> items)? started,
    TResult? Function(Product product, ProductVariant? variant)? addItem,
    TResult? Function(Product product, ProductVariant? variant)? removeItem,
    TResult? Function(Product product, String notes)? updateItemNotes,
    TResult? Function(OrderType orderType)? updateOrderType,
    TResult? Function(Delivery delivery)? updateDelivery,
    TResult? Function(Table? table)? updateTable,
    TResult? Function(Order? order)? orderAddedItems,
    TResult? Function(String name)? customerNameChanged,
  }) {
    return customerNameChanged?.call(name);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(List<ProductQuantity> items)? started,
    TResult Function(Product product, ProductVariant? variant)? addItem,
    TResult Function(Product product, ProductVariant? variant)? removeItem,
    TResult Function(Product product, String notes)? updateItemNotes,
    TResult Function(OrderType orderType)? updateOrderType,
    TResult Function(Delivery delivery)? updateDelivery,
    TResult Function(Table? table)? updateTable,
    TResult Function(Order? order)? orderAddedItems,
    TResult Function(String name)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (customerNameChanged != null) {
      return customerNameChanged(name);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Started value) started,
    required TResult Function(_AddItem value) addItem,
    required TResult Function(_RemoveItem value) removeItem,
    required TResult Function(_UpdateItemNotes value) updateItemNotes,
    required TResult Function(_UpdateOrderType value) updateOrderType,
    required TResult Function(_UpdateDelivery value) updateDelivery,
    required TResult Function(_UpdateTable value) updateTable,
    required TResult Function(_OrderAddedItems value) orderAddedItems,
    required TResult Function(_CustomerNameChanged value) customerNameChanged,
  }) {
    return customerNameChanged(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Started value)? started,
    TResult? Function(_AddItem value)? addItem,
    TResult? Function(_RemoveItem value)? removeItem,
    TResult? Function(_UpdateItemNotes value)? updateItemNotes,
    TResult? Function(_UpdateOrderType value)? updateOrderType,
    TResult? Function(_UpdateDelivery value)? updateDelivery,
    TResult? Function(_UpdateTable value)? updateTable,
    TResult? Function(_OrderAddedItems value)? orderAddedItems,
    TResult? Function(_CustomerNameChanged value)? customerNameChanged,
  }) {
    return customerNameChanged?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Started value)? started,
    TResult Function(_AddItem value)? addItem,
    TResult Function(_RemoveItem value)? removeItem,
    TResult Function(_UpdateItemNotes value)? updateItemNotes,
    TResult Function(_UpdateOrderType value)? updateOrderType,
    TResult Function(_UpdateDelivery value)? updateDelivery,
    TResult Function(_UpdateTable value)? updateTable,
    TResult Function(_OrderAddedItems value)? orderAddedItems,
    TResult Function(_CustomerNameChanged value)? customerNameChanged,
    required TResult orElse(),
  }) {
    if (customerNameChanged != null) {
      return customerNameChanged(this);
    }
    return orElse();
  }
}

abstract class _CustomerNameChanged implements CheckoutFormEvent {
  const factory _CustomerNameChanged(final String name) =
      _$CustomerNameChangedImpl;

  String get name;

  /// Create a copy of CheckoutFormEvent
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$CustomerNameChangedImplCopyWith<_$CustomerNameChangedImpl> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
mixin _$CheckoutFormState {
  Order? get orderAdded => throw _privateConstructorUsedError;
  List<ProductQuantity> get items => throw _privateConstructorUsedError;
  int get discount => throw _privateConstructorUsedError;
  int get discountAmount => throw _privateConstructorUsedError;
  int get tax => throw _privateConstructorUsedError;
  int get serviceCharge => throw _privateConstructorUsedError;
  int get totalQuantity => throw _privateConstructorUsedError;
  int get totalPrice => throw _privateConstructorUsedError;
  String get draftName => throw _privateConstructorUsedError;
  OrderType get orderType => throw _privateConstructorUsedError;
  String get customerName => throw _privateConstructorUsedError;
  Delivery? get delivery => throw _privateConstructorUsedError;
  Table? get table => throw _privateConstructorUsedError;
  bool get isLoading => throw _privateConstructorUsedError;

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  $CheckoutFormStateCopyWith<CheckoutFormState> get copyWith =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CheckoutFormStateCopyWith<$Res> {
  factory $CheckoutFormStateCopyWith(
    CheckoutFormState value,
    $Res Function(CheckoutFormState) then,
  ) = _$CheckoutFormStateCopyWithImpl<$Res, CheckoutFormState>;
  @useResult
  $Res call({
    Order? orderAdded,
    List<ProductQuantity> items,
    int discount,
    int discountAmount,
    int tax,
    int serviceCharge,
    int totalQuantity,
    int totalPrice,
    String draftName,
    OrderType orderType,
    String customerName,
    Delivery? delivery,
    Table? table,
    bool isLoading,
  });

  $OrderCopyWith<$Res>? get orderAdded;
  $TableCopyWith<$Res>? get table;
}

/// @nodoc
class _$CheckoutFormStateCopyWithImpl<$Res, $Val extends CheckoutFormState>
    implements $CheckoutFormStateCopyWith<$Res> {
  _$CheckoutFormStateCopyWithImpl(this._value, this._then);

  // ignore: unused_field
  final $Val _value;
  // ignore: unused_field
  final $Res Function($Val) _then;

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? orderAdded = freezed,
    Object? items = null,
    Object? discount = null,
    Object? discountAmount = null,
    Object? tax = null,
    Object? serviceCharge = null,
    Object? totalQuantity = null,
    Object? totalPrice = null,
    Object? draftName = null,
    Object? orderType = null,
    Object? customerName = null,
    Object? delivery = freezed,
    Object? table = freezed,
    Object? isLoading = null,
  }) {
    return _then(
      _value.copyWith(
            orderAdded: freezed == orderAdded
                ? _value.orderAdded
                : orderAdded // ignore: cast_nullable_to_non_nullable
                      as Order?,
            items: null == items
                ? _value.items
                : items // ignore: cast_nullable_to_non_nullable
                      as List<ProductQuantity>,
            discount: null == discount
                ? _value.discount
                : discount // ignore: cast_nullable_to_non_nullable
                      as int,
            discountAmount: null == discountAmount
                ? _value.discountAmount
                : discountAmount // ignore: cast_nullable_to_non_nullable
                      as int,
            tax: null == tax
                ? _value.tax
                : tax // ignore: cast_nullable_to_non_nullable
                      as int,
            serviceCharge: null == serviceCharge
                ? _value.serviceCharge
                : serviceCharge // ignore: cast_nullable_to_non_nullable
                      as int,
            totalQuantity: null == totalQuantity
                ? _value.totalQuantity
                : totalQuantity // ignore: cast_nullable_to_non_nullable
                      as int,
            totalPrice: null == totalPrice
                ? _value.totalPrice
                : totalPrice // ignore: cast_nullable_to_non_nullable
                      as int,
            draftName: null == draftName
                ? _value.draftName
                : draftName // ignore: cast_nullable_to_non_nullable
                      as String,
            orderType: null == orderType
                ? _value.orderType
                : orderType // ignore: cast_nullable_to_non_nullable
                      as OrderType,
            customerName: null == customerName
                ? _value.customerName
                : customerName // ignore: cast_nullable_to_non_nullable
                      as String,
            delivery: freezed == delivery
                ? _value.delivery
                : delivery // ignore: cast_nullable_to_non_nullable
                      as Delivery?,
            table: freezed == table
                ? _value.table
                : table // ignore: cast_nullable_to_non_nullable
                      as Table?,
            isLoading: null == isLoading
                ? _value.isLoading
                : isLoading // ignore: cast_nullable_to_non_nullable
                      as bool,
          )
          as $Val,
    );
  }

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $OrderCopyWith<$Res>? get orderAdded {
    if (_value.orderAdded == null) {
      return null;
    }

    return $OrderCopyWith<$Res>(_value.orderAdded!, (value) {
      return _then(_value.copyWith(orderAdded: value) as $Val);
    });
  }

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @pragma('vm:prefer-inline')
  $TableCopyWith<$Res>? get table {
    if (_value.table == null) {
      return null;
    }

    return $TableCopyWith<$Res>(_value.table!, (value) {
      return _then(_value.copyWith(table: value) as $Val);
    });
  }
}

/// @nodoc
abstract class _$$CheckoutFormStateImplCopyWith<$Res>
    implements $CheckoutFormStateCopyWith<$Res> {
  factory _$$CheckoutFormStateImplCopyWith(
    _$CheckoutFormStateImpl value,
    $Res Function(_$CheckoutFormStateImpl) then,
  ) = __$$CheckoutFormStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    Order? orderAdded,
    List<ProductQuantity> items,
    int discount,
    int discountAmount,
    int tax,
    int serviceCharge,
    int totalQuantity,
    int totalPrice,
    String draftName,
    OrderType orderType,
    String customerName,
    Delivery? delivery,
    Table? table,
    bool isLoading,
  });

  @override
  $OrderCopyWith<$Res>? get orderAdded;
  @override
  $TableCopyWith<$Res>? get table;
}

/// @nodoc
class __$$CheckoutFormStateImplCopyWithImpl<$Res>
    extends _$CheckoutFormStateCopyWithImpl<$Res, _$CheckoutFormStateImpl>
    implements _$$CheckoutFormStateImplCopyWith<$Res> {
  __$$CheckoutFormStateImplCopyWithImpl(
    _$CheckoutFormStateImpl _value,
    $Res Function(_$CheckoutFormStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? orderAdded = freezed,
    Object? items = null,
    Object? discount = null,
    Object? discountAmount = null,
    Object? tax = null,
    Object? serviceCharge = null,
    Object? totalQuantity = null,
    Object? totalPrice = null,
    Object? draftName = null,
    Object? orderType = null,
    Object? customerName = null,
    Object? delivery = freezed,
    Object? table = freezed,
    Object? isLoading = null,
  }) {
    return _then(
      _$CheckoutFormStateImpl(
        orderAdded: freezed == orderAdded
            ? _value.orderAdded
            : orderAdded // ignore: cast_nullable_to_non_nullable
                  as Order?,
        items: null == items
            ? _value._items
            : items // ignore: cast_nullable_to_non_nullable
                  as List<ProductQuantity>,
        discount: null == discount
            ? _value.discount
            : discount // ignore: cast_nullable_to_non_nullable
                  as int,
        discountAmount: null == discountAmount
            ? _value.discountAmount
            : discountAmount // ignore: cast_nullable_to_non_nullable
                  as int,
        tax: null == tax
            ? _value.tax
            : tax // ignore: cast_nullable_to_non_nullable
                  as int,
        serviceCharge: null == serviceCharge
            ? _value.serviceCharge
            : serviceCharge // ignore: cast_nullable_to_non_nullable
                  as int,
        totalQuantity: null == totalQuantity
            ? _value.totalQuantity
            : totalQuantity // ignore: cast_nullable_to_non_nullable
                  as int,
        totalPrice: null == totalPrice
            ? _value.totalPrice
            : totalPrice // ignore: cast_nullable_to_non_nullable
                  as int,
        draftName: null == draftName
            ? _value.draftName
            : draftName // ignore: cast_nullable_to_non_nullable
                  as String,
        orderType: null == orderType
            ? _value.orderType
            : orderType // ignore: cast_nullable_to_non_nullable
                  as OrderType,
        customerName: null == customerName
            ? _value.customerName
            : customerName // ignore: cast_nullable_to_non_nullable
                  as String,
        delivery: freezed == delivery
            ? _value.delivery
            : delivery // ignore: cast_nullable_to_non_nullable
                  as Delivery?,
        table: freezed == table
            ? _value.table
            : table // ignore: cast_nullable_to_non_nullable
                  as Table?,
        isLoading: null == isLoading
            ? _value.isLoading
            : isLoading // ignore: cast_nullable_to_non_nullable
                  as bool,
      ),
    );
  }
}

/// @nodoc

class _$CheckoutFormStateImpl implements _CheckoutFormState {
  _$CheckoutFormStateImpl({
    this.orderAdded,
    required final List<ProductQuantity> items,
    required this.discount,
    required this.discountAmount,
    required this.tax,
    required this.serviceCharge,
    required this.totalQuantity,
    required this.totalPrice,
    required this.draftName,
    required this.orderType,
    required this.customerName,
    this.delivery,
    this.table,
    this.isLoading = false,
  }) : _items = items;

  @override
  final Order? orderAdded;
  final List<ProductQuantity> _items;
  @override
  List<ProductQuantity> get items {
    if (_items is EqualUnmodifiableListView) return _items;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_items);
  }

  @override
  final int discount;
  @override
  final int discountAmount;
  @override
  final int tax;
  @override
  final int serviceCharge;
  @override
  final int totalQuantity;
  @override
  final int totalPrice;
  @override
  final String draftName;
  @override
  final OrderType orderType;
  @override
  final String customerName;
  @override
  final Delivery? delivery;
  @override
  final Table? table;
  @override
  @JsonKey()
  final bool isLoading;

  @override
  String toString() {
    return 'CheckoutFormState(orderAdded: $orderAdded, items: $items, discount: $discount, discountAmount: $discountAmount, tax: $tax, serviceCharge: $serviceCharge, totalQuantity: $totalQuantity, totalPrice: $totalPrice, draftName: $draftName, orderType: $orderType, customerName: $customerName, delivery: $delivery, table: $table, isLoading: $isLoading)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$CheckoutFormStateImpl &&
            (identical(other.orderAdded, orderAdded) ||
                other.orderAdded == orderAdded) &&
            const DeepCollectionEquality().equals(other._items, _items) &&
            (identical(other.discount, discount) ||
                other.discount == discount) &&
            (identical(other.discountAmount, discountAmount) ||
                other.discountAmount == discountAmount) &&
            (identical(other.tax, tax) || other.tax == tax) &&
            (identical(other.serviceCharge, serviceCharge) ||
                other.serviceCharge == serviceCharge) &&
            (identical(other.totalQuantity, totalQuantity) ||
                other.totalQuantity == totalQuantity) &&
            (identical(other.totalPrice, totalPrice) ||
                other.totalPrice == totalPrice) &&
            (identical(other.draftName, draftName) ||
                other.draftName == draftName) &&
            (identical(other.orderType, orderType) ||
                other.orderType == orderType) &&
            (identical(other.customerName, customerName) ||
                other.customerName == customerName) &&
            (identical(other.delivery, delivery) ||
                other.delivery == delivery) &&
            (identical(other.table, table) || other.table == table) &&
            (identical(other.isLoading, isLoading) ||
                other.isLoading == isLoading));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    orderAdded,
    const DeepCollectionEquality().hash(_items),
    discount,
    discountAmount,
    tax,
    serviceCharge,
    totalQuantity,
    totalPrice,
    draftName,
    orderType,
    customerName,
    delivery,
    table,
    isLoading,
  );

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @JsonKey(includeFromJson: false, includeToJson: false)
  @override
  @pragma('vm:prefer-inline')
  _$$CheckoutFormStateImplCopyWith<_$CheckoutFormStateImpl> get copyWith =>
      __$$CheckoutFormStateImplCopyWithImpl<_$CheckoutFormStateImpl>(
        this,
        _$identity,
      );
}

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

  @override
  Order? get orderAdded;
  @override
  List<ProductQuantity> get items;
  @override
  int get discount;
  @override
  int get discountAmount;
  @override
  int get tax;
  @override
  int get serviceCharge;
  @override
  int get totalQuantity;
  @override
  int get totalPrice;
  @override
  String get draftName;
  @override
  OrderType get orderType;
  @override
  String get customerName;
  @override
  Delivery? get delivery;
  @override
  Table? get table;
  @override
  bool get isLoading;

  /// Create a copy of CheckoutFormState
  /// with the given fields replaced by the non-null parameter values.
  @override
  @JsonKey(includeFromJson: false, includeToJson: false)
  _$$CheckoutFormStateImplCopyWith<_$CheckoutFormStateImpl> get copyWith =>
      throw _privateConstructorUsedError;
}
