// 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 'void_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 _$VoidFormEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $VoidFormEventCopyWith<$Res> {
  factory $VoidFormEventCopyWith(
    VoidFormEvent value,
    $Res Function(VoidFormEvent) then,
  ) = _$VoidFormEventCopyWithImpl<$Res, VoidFormEvent>;
}

/// @nodoc
class _$VoidFormEventCopyWithImpl<$Res, $Val extends VoidFormEvent>
    implements $VoidFormEventCopyWith<$Res> {
  _$VoidFormEventCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$SetOrderImplCopyWith<$Res> {
  factory _$$SetOrderImplCopyWith(
    _$SetOrderImpl value,
    $Res Function(_$SetOrderImpl) then,
  ) = __$$SetOrderImplCopyWithImpl<$Res>;
  @useResult
  $Res call({Order order});

  $OrderCopyWith<$Res> get order;
}

/// @nodoc
class __$$SetOrderImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$SetOrderImpl>
    implements _$$SetOrderImplCopyWith<$Res> {
  __$$SetOrderImplCopyWithImpl(
    _$SetOrderImpl _value,
    $Res Function(_$SetOrderImpl) _then,
  ) : super(_value, _then);

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

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

/// @nodoc

class _$SetOrderImpl implements _SetOrder {
  const _$SetOrderImpl(this.order);

  @override
  final Order order;

  @override
  String toString() {
    return 'VoidFormEvent.setOrder(order: $order)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return setOrder(order);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return setOrder?.call(order);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (setOrder != null) {
      return setOrder(order);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return setOrder(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return setOrder?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (setOrder != null) {
      return setOrder(this);
    }
    return orElse();
  }
}

abstract class _SetOrder implements VoidFormEvent {
  const factory _SetOrder(final Order order) = _$SetOrderImpl;

  Order get order;

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

/// @nodoc
abstract class _$$VoidTypeChangedImplCopyWith<$Res> {
  factory _$$VoidTypeChangedImplCopyWith(
    _$VoidTypeChangedImpl value,
    $Res Function(_$VoidTypeChangedImpl) then,
  ) = __$$VoidTypeChangedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({VoidType voidType});
}

/// @nodoc
class __$$VoidTypeChangedImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$VoidTypeChangedImpl>
    implements _$$VoidTypeChangedImplCopyWith<$Res> {
  __$$VoidTypeChangedImplCopyWithImpl(
    _$VoidTypeChangedImpl _value,
    $Res Function(_$VoidTypeChangedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$VoidTypeChangedImpl implements _VoidTypeChanged {
  const _$VoidTypeChangedImpl(this.voidType);

  @override
  final VoidType voidType;

  @override
  String toString() {
    return 'VoidFormEvent.voidTypeChanged(voidType: $voidType)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return voidTypeChanged(voidType);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return voidTypeChanged?.call(voidType);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (voidTypeChanged != null) {
      return voidTypeChanged(voidType);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return voidTypeChanged(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return voidTypeChanged?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (voidTypeChanged != null) {
      return voidTypeChanged(this);
    }
    return orElse();
  }
}

abstract class _VoidTypeChanged implements VoidFormEvent {
  const factory _VoidTypeChanged(final VoidType voidType) =
      _$VoidTypeChangedImpl;

  VoidType get voidType;

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

/// @nodoc
abstract class _$$VoidReasonChangedImplCopyWith<$Res> {
  factory _$$VoidReasonChangedImplCopyWith(
    _$VoidReasonChangedImpl value,
    $Res Function(_$VoidReasonChangedImpl) then,
  ) = __$$VoidReasonChangedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String voidReason});
}

/// @nodoc
class __$$VoidReasonChangedImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$VoidReasonChangedImpl>
    implements _$$VoidReasonChangedImplCopyWith<$Res> {
  __$$VoidReasonChangedImplCopyWithImpl(
    _$VoidReasonChangedImpl _value,
    $Res Function(_$VoidReasonChangedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$VoidReasonChangedImpl implements _VoidReasonChanged {
  const _$VoidReasonChangedImpl(this.voidReason);

  @override
  final String voidReason;

  @override
  String toString() {
    return 'VoidFormEvent.voidReasonChanged(voidReason: $voidReason)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return voidReasonChanged(voidReason);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return voidReasonChanged?.call(voidReason);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (voidReasonChanged != null) {
      return voidReasonChanged(voidReason);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return voidReasonChanged(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return voidReasonChanged?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (voidReasonChanged != null) {
      return voidReasonChanged(this);
    }
    return orElse();
  }
}

abstract class _VoidReasonChanged implements VoidFormEvent {
  const factory _VoidReasonChanged(final String voidReason) =
      _$VoidReasonChangedImpl;

  String get voidReason;

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

/// @nodoc
abstract class _$$ItemQuantityChangedImplCopyWith<$Res> {
  factory _$$ItemQuantityChangedImplCopyWith(
    _$ItemQuantityChangedImpl value,
    $Res Function(_$ItemQuantityChangedImpl) then,
  ) = __$$ItemQuantityChangedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String itemId, int quantity});
}

/// @nodoc
class __$$ItemQuantityChangedImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$ItemQuantityChangedImpl>
    implements _$$ItemQuantityChangedImplCopyWith<$Res> {
  __$$ItemQuantityChangedImplCopyWithImpl(
    _$ItemQuantityChangedImpl _value,
    $Res Function(_$ItemQuantityChangedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$ItemQuantityChangedImpl implements _ItemQuantityChanged {
  const _$ItemQuantityChangedImpl({
    required this.itemId,
    required this.quantity,
  });

  @override
  final String itemId;
  @override
  final int quantity;

  @override
  String toString() {
    return 'VoidFormEvent.itemQuantityChanged(itemId: $itemId, quantity: $quantity)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return itemQuantityChanged(itemId, quantity);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return itemQuantityChanged?.call(itemId, quantity);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (itemQuantityChanged != null) {
      return itemQuantityChanged(itemId, quantity);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return itemQuantityChanged(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return itemQuantityChanged?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (itemQuantityChanged != null) {
      return itemQuantityChanged(this);
    }
    return orElse();
  }
}

abstract class _ItemQuantityChanged implements VoidFormEvent {
  const factory _ItemQuantityChanged({
    required final String itemId,
    required final int quantity,
  }) = _$ItemQuantityChangedImpl;

  String get itemId;
  int get quantity;

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

/// @nodoc
abstract class _$$ClearSelectedItemImplCopyWith<$Res> {
  factory _$$ClearSelectedItemImplCopyWith(
    _$ClearSelectedItemImpl value,
    $Res Function(_$ClearSelectedItemImpl) then,
  ) = __$$ClearSelectedItemImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ClearSelectedItemImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$ClearSelectedItemImpl>
    implements _$$ClearSelectedItemImplCopyWith<$Res> {
  __$$ClearSelectedItemImplCopyWithImpl(
    _$ClearSelectedItemImpl _value,
    $Res Function(_$ClearSelectedItemImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$ClearSelectedItemImpl implements _ClearSelectedItem {
  const _$ClearSelectedItemImpl();

  @override
  String toString() {
    return 'VoidFormEvent.clearSelectedItem()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return clearSelectedItem();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return clearSelectedItem?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (clearSelectedItem != null) {
      return clearSelectedItem();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return clearSelectedItem(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return clearSelectedItem?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (clearSelectedItem != null) {
      return clearSelectedItem(this);
    }
    return orElse();
  }
}

abstract class _ClearSelectedItem implements VoidFormEvent {
  const factory _ClearSelectedItem() = _$ClearSelectedItemImpl;
}

/// @nodoc
abstract class _$$SubmittedImplCopyWith<$Res> {
  factory _$$SubmittedImplCopyWith(
    _$SubmittedImpl value,
    $Res Function(_$SubmittedImpl) then,
  ) = __$$SubmittedImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$SubmittedImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$SubmittedImpl>
    implements _$$SubmittedImplCopyWith<$Res> {
  __$$SubmittedImplCopyWithImpl(
    _$SubmittedImpl _value,
    $Res Function(_$SubmittedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$SubmittedImpl implements _Submitted {
  const _$SubmittedImpl();

  @override
  String toString() {
    return 'VoidFormEvent.submitted()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return submitted();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return submitted?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (submitted != null) {
      return submitted();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return submitted(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return submitted?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (submitted != null) {
      return submitted(this);
    }
    return orElse();
  }
}

abstract class _Submitted implements VoidFormEvent {
  const factory _Submitted() = _$SubmittedImpl;
}

/// @nodoc
abstract class _$$ClearStateImplCopyWith<$Res> {
  factory _$$ClearStateImplCopyWith(
    _$ClearStateImpl value,
    $Res Function(_$ClearStateImpl) then,
  ) = __$$ClearStateImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ClearStateImplCopyWithImpl<$Res>
    extends _$VoidFormEventCopyWithImpl<$Res, _$ClearStateImpl>
    implements _$$ClearStateImplCopyWith<$Res> {
  __$$ClearStateImplCopyWithImpl(
    _$ClearStateImpl _value,
    $Res Function(_$ClearStateImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$ClearStateImpl implements _ClearState {
  const _$ClearStateImpl();

  @override
  String toString() {
    return 'VoidFormEvent.clearState()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(Order order) setOrder,
    required TResult Function(VoidType voidType) voidTypeChanged,
    required TResult Function(String voidReason) voidReasonChanged,
    required TResult Function(String itemId, int quantity) itemQuantityChanged,
    required TResult Function() clearSelectedItem,
    required TResult Function() submitted,
    required TResult Function() clearState,
  }) {
    return clearState();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(Order order)? setOrder,
    TResult? Function(VoidType voidType)? voidTypeChanged,
    TResult? Function(String voidReason)? voidReasonChanged,
    TResult? Function(String itemId, int quantity)? itemQuantityChanged,
    TResult? Function()? clearSelectedItem,
    TResult? Function()? submitted,
    TResult? Function()? clearState,
  }) {
    return clearState?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(Order order)? setOrder,
    TResult Function(VoidType voidType)? voidTypeChanged,
    TResult Function(String voidReason)? voidReasonChanged,
    TResult Function(String itemId, int quantity)? itemQuantityChanged,
    TResult Function()? clearSelectedItem,
    TResult Function()? submitted,
    TResult Function()? clearState,
    required TResult orElse(),
  }) {
    if (clearState != null) {
      return clearState();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_SetOrder value) setOrder,
    required TResult Function(_VoidTypeChanged value) voidTypeChanged,
    required TResult Function(_VoidReasonChanged value) voidReasonChanged,
    required TResult Function(_ItemQuantityChanged value) itemQuantityChanged,
    required TResult Function(_ClearSelectedItem value) clearSelectedItem,
    required TResult Function(_Submitted value) submitted,
    required TResult Function(_ClearState value) clearState,
  }) {
    return clearState(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_SetOrder value)? setOrder,
    TResult? Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult? Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult? Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult? Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult? Function(_Submitted value)? submitted,
    TResult? Function(_ClearState value)? clearState,
  }) {
    return clearState?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_SetOrder value)? setOrder,
    TResult Function(_VoidTypeChanged value)? voidTypeChanged,
    TResult Function(_VoidReasonChanged value)? voidReasonChanged,
    TResult Function(_ItemQuantityChanged value)? itemQuantityChanged,
    TResult Function(_ClearSelectedItem value)? clearSelectedItem,
    TResult Function(_Submitted value)? submitted,
    TResult Function(_ClearState value)? clearState,
    required TResult orElse(),
  }) {
    if (clearState != null) {
      return clearState(this);
    }
    return orElse();
  }
}

abstract class _ClearState implements VoidFormEvent {
  const factory _ClearState() = _$ClearStateImpl;
}

/// @nodoc
mixin _$VoidFormState {
  Order get order => throw _privateConstructorUsedError;
  List<OrderItem> get pendingItems => throw _privateConstructorUsedError;
  List<OrderItem> get voidItems => throw _privateConstructorUsedError;
  VoidType get voidType => throw _privateConstructorUsedError;
  Map<String, int> get selectedItemQuantities =>
      throw _privateConstructorUsedError;
  String? get voidReason => throw _privateConstructorUsedError;
  int get totalPriceVoid => throw _privateConstructorUsedError;
  Option<Either<OrderFailure, Unit>> get failureOrVoid =>
      throw _privateConstructorUsedError;
  bool get isSubmitting => throw _privateConstructorUsedError;

  /// Idempotency key untuk void submission.
  /// Di-generate saat user tap "Void", dipakai ulang saat retry,
  /// di-clear setelah sukses atau clearState.
  String? get idempotencyKey => throw _privateConstructorUsedError;

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

/// @nodoc
abstract class $VoidFormStateCopyWith<$Res> {
  factory $VoidFormStateCopyWith(
    VoidFormState value,
    $Res Function(VoidFormState) then,
  ) = _$VoidFormStateCopyWithImpl<$Res, VoidFormState>;
  @useResult
  $Res call({
    Order order,
    List<OrderItem> pendingItems,
    List<OrderItem> voidItems,
    VoidType voidType,
    Map<String, int> selectedItemQuantities,
    String? voidReason,
    int totalPriceVoid,
    Option<Either<OrderFailure, Unit>> failureOrVoid,
    bool isSubmitting,
    String? idempotencyKey,
  });

  $OrderCopyWith<$Res> get order;
}

/// @nodoc
class _$VoidFormStateCopyWithImpl<$Res, $Val extends VoidFormState>
    implements $VoidFormStateCopyWith<$Res> {
  _$VoidFormStateCopyWithImpl(this._value, this._then);

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

  /// Create a copy of VoidFormState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? order = null,
    Object? pendingItems = null,
    Object? voidItems = null,
    Object? voidType = null,
    Object? selectedItemQuantities = null,
    Object? voidReason = freezed,
    Object? totalPriceVoid = null,
    Object? failureOrVoid = null,
    Object? isSubmitting = null,
    Object? idempotencyKey = freezed,
  }) {
    return _then(
      _value.copyWith(
            order: null == order
                ? _value.order
                : order // ignore: cast_nullable_to_non_nullable
                      as Order,
            pendingItems: null == pendingItems
                ? _value.pendingItems
                : pendingItems // ignore: cast_nullable_to_non_nullable
                      as List<OrderItem>,
            voidItems: null == voidItems
                ? _value.voidItems
                : voidItems // ignore: cast_nullable_to_non_nullable
                      as List<OrderItem>,
            voidType: null == voidType
                ? _value.voidType
                : voidType // ignore: cast_nullable_to_non_nullable
                      as VoidType,
            selectedItemQuantities: null == selectedItemQuantities
                ? _value.selectedItemQuantities
                : selectedItemQuantities // ignore: cast_nullable_to_non_nullable
                      as Map<String, int>,
            voidReason: freezed == voidReason
                ? _value.voidReason
                : voidReason // ignore: cast_nullable_to_non_nullable
                      as String?,
            totalPriceVoid: null == totalPriceVoid
                ? _value.totalPriceVoid
                : totalPriceVoid // ignore: cast_nullable_to_non_nullable
                      as int,
            failureOrVoid: null == failureOrVoid
                ? _value.failureOrVoid
                : failureOrVoid // ignore: cast_nullable_to_non_nullable
                      as Option<Either<OrderFailure, Unit>>,
            isSubmitting: null == isSubmitting
                ? _value.isSubmitting
                : isSubmitting // ignore: cast_nullable_to_non_nullable
                      as bool,
            idempotencyKey: freezed == idempotencyKey
                ? _value.idempotencyKey
                : idempotencyKey // ignore: cast_nullable_to_non_nullable
                      as String?,
          )
          as $Val,
    );
  }

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

/// @nodoc
abstract class _$$VoidFormStateImplCopyWith<$Res>
    implements $VoidFormStateCopyWith<$Res> {
  factory _$$VoidFormStateImplCopyWith(
    _$VoidFormStateImpl value,
    $Res Function(_$VoidFormStateImpl) then,
  ) = __$$VoidFormStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    Order order,
    List<OrderItem> pendingItems,
    List<OrderItem> voidItems,
    VoidType voidType,
    Map<String, int> selectedItemQuantities,
    String? voidReason,
    int totalPriceVoid,
    Option<Either<OrderFailure, Unit>> failureOrVoid,
    bool isSubmitting,
    String? idempotencyKey,
  });

  @override
  $OrderCopyWith<$Res> get order;
}

/// @nodoc
class __$$VoidFormStateImplCopyWithImpl<$Res>
    extends _$VoidFormStateCopyWithImpl<$Res, _$VoidFormStateImpl>
    implements _$$VoidFormStateImplCopyWith<$Res> {
  __$$VoidFormStateImplCopyWithImpl(
    _$VoidFormStateImpl _value,
    $Res Function(_$VoidFormStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of VoidFormState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? order = null,
    Object? pendingItems = null,
    Object? voidItems = null,
    Object? voidType = null,
    Object? selectedItemQuantities = null,
    Object? voidReason = freezed,
    Object? totalPriceVoid = null,
    Object? failureOrVoid = null,
    Object? isSubmitting = null,
    Object? idempotencyKey = freezed,
  }) {
    return _then(
      _$VoidFormStateImpl(
        order: null == order
            ? _value.order
            : order // ignore: cast_nullable_to_non_nullable
                  as Order,
        pendingItems: null == pendingItems
            ? _value._pendingItems
            : pendingItems // ignore: cast_nullable_to_non_nullable
                  as List<OrderItem>,
        voidItems: null == voidItems
            ? _value._voidItems
            : voidItems // ignore: cast_nullable_to_non_nullable
                  as List<OrderItem>,
        voidType: null == voidType
            ? _value.voidType
            : voidType // ignore: cast_nullable_to_non_nullable
                  as VoidType,
        selectedItemQuantities: null == selectedItemQuantities
            ? _value._selectedItemQuantities
            : selectedItemQuantities // ignore: cast_nullable_to_non_nullable
                  as Map<String, int>,
        voidReason: freezed == voidReason
            ? _value.voidReason
            : voidReason // ignore: cast_nullable_to_non_nullable
                  as String?,
        totalPriceVoid: null == totalPriceVoid
            ? _value.totalPriceVoid
            : totalPriceVoid // ignore: cast_nullable_to_non_nullable
                  as int,
        failureOrVoid: null == failureOrVoid
            ? _value.failureOrVoid
            : failureOrVoid // ignore: cast_nullable_to_non_nullable
                  as Option<Either<OrderFailure, Unit>>,
        isSubmitting: null == isSubmitting
            ? _value.isSubmitting
            : isSubmitting // ignore: cast_nullable_to_non_nullable
                  as bool,
        idempotencyKey: freezed == idempotencyKey
            ? _value.idempotencyKey
            : idempotencyKey // ignore: cast_nullable_to_non_nullable
                  as String?,
      ),
    );
  }
}

/// @nodoc

class _$VoidFormStateImpl implements _VoidFormState {
  _$VoidFormStateImpl({
    required this.order,
    required final List<OrderItem> pendingItems,
    required final List<OrderItem> voidItems,
    required this.voidType,
    required final Map<String, int> selectedItemQuantities,
    this.voidReason,
    required this.totalPriceVoid,
    required this.failureOrVoid,
    this.isSubmitting = false,
    this.idempotencyKey,
  }) : _pendingItems = pendingItems,
       _voidItems = voidItems,
       _selectedItemQuantities = selectedItemQuantities;

  @override
  final Order order;
  final List<OrderItem> _pendingItems;
  @override
  List<OrderItem> get pendingItems {
    if (_pendingItems is EqualUnmodifiableListView) return _pendingItems;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_pendingItems);
  }

  final List<OrderItem> _voidItems;
  @override
  List<OrderItem> get voidItems {
    if (_voidItems is EqualUnmodifiableListView) return _voidItems;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_voidItems);
  }

  @override
  final VoidType voidType;
  final Map<String, int> _selectedItemQuantities;
  @override
  Map<String, int> get selectedItemQuantities {
    if (_selectedItemQuantities is EqualUnmodifiableMapView)
      return _selectedItemQuantities;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableMapView(_selectedItemQuantities);
  }

  @override
  final String? voidReason;
  @override
  final int totalPriceVoid;
  @override
  final Option<Either<OrderFailure, Unit>> failureOrVoid;
  @override
  @JsonKey()
  final bool isSubmitting;

  /// Idempotency key untuk void submission.
  /// Di-generate saat user tap "Void", dipakai ulang saat retry,
  /// di-clear setelah sukses atau clearState.
  @override
  final String? idempotencyKey;

  @override
  String toString() {
    return 'VoidFormState(order: $order, pendingItems: $pendingItems, voidItems: $voidItems, voidType: $voidType, selectedItemQuantities: $selectedItemQuantities, voidReason: $voidReason, totalPriceVoid: $totalPriceVoid, failureOrVoid: $failureOrVoid, isSubmitting: $isSubmitting, idempotencyKey: $idempotencyKey)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$VoidFormStateImpl &&
            (identical(other.order, order) || other.order == order) &&
            const DeepCollectionEquality().equals(
              other._pendingItems,
              _pendingItems,
            ) &&
            const DeepCollectionEquality().equals(
              other._voidItems,
              _voidItems,
            ) &&
            (identical(other.voidType, voidType) ||
                other.voidType == voidType) &&
            const DeepCollectionEquality().equals(
              other._selectedItemQuantities,
              _selectedItemQuantities,
            ) &&
            (identical(other.voidReason, voidReason) ||
                other.voidReason == voidReason) &&
            (identical(other.totalPriceVoid, totalPriceVoid) ||
                other.totalPriceVoid == totalPriceVoid) &&
            (identical(other.failureOrVoid, failureOrVoid) ||
                other.failureOrVoid == failureOrVoid) &&
            (identical(other.isSubmitting, isSubmitting) ||
                other.isSubmitting == isSubmitting) &&
            (identical(other.idempotencyKey, idempotencyKey) ||
                other.idempotencyKey == idempotencyKey));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    order,
    const DeepCollectionEquality().hash(_pendingItems),
    const DeepCollectionEquality().hash(_voidItems),
    voidType,
    const DeepCollectionEquality().hash(_selectedItemQuantities),
    voidReason,
    totalPriceVoid,
    failureOrVoid,
    isSubmitting,
    idempotencyKey,
  );

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

abstract class _VoidFormState implements VoidFormState {
  factory _VoidFormState({
    required final Order order,
    required final List<OrderItem> pendingItems,
    required final List<OrderItem> voidItems,
    required final VoidType voidType,
    required final Map<String, int> selectedItemQuantities,
    final String? voidReason,
    required final int totalPriceVoid,
    required final Option<Either<OrderFailure, Unit>> failureOrVoid,
    final bool isSubmitting,
    final String? idempotencyKey,
  }) = _$VoidFormStateImpl;

  @override
  Order get order;
  @override
  List<OrderItem> get pendingItems;
  @override
  List<OrderItem> get voidItems;
  @override
  VoidType get voidType;
  @override
  Map<String, int> get selectedItemQuantities;
  @override
  String? get voidReason;
  @override
  int get totalPriceVoid;
  @override
  Option<Either<OrderFailure, Unit>> get failureOrVoid;
  @override
  bool get isSubmitting;

  /// Idempotency key untuk void submission.
  /// Di-generate saat user tap "Void", dipakai ulang saat retry,
  /// di-clear setelah sukses atau clearState.
  @override
  String? get idempotencyKey;

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