// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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 '../../../presentation/app/cart_cubit.dart';

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

// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$CartState {

 bool get isLoading; AppError get error; Map<int, ProductInCart> get productsWithQuantity; bool get isDelivery; bool get chargeToRoom; String get comment; String get readyTime; String get deliveryLocationCode; DeliveryLocation get deliveryLocation; AreaDetails? get selectedArea;
/// Create a copy of CartState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CartStateCopyWith<CartState> get copyWith => _$CartStateCopyWithImpl<CartState>(this as CartState, _$identity);



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is CartState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.error, error) || other.error == error)&&const DeepCollectionEquality().equals(other.productsWithQuantity, productsWithQuantity)&&(identical(other.isDelivery, isDelivery) || other.isDelivery == isDelivery)&&(identical(other.chargeToRoom, chargeToRoom) || other.chargeToRoom == chargeToRoom)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.readyTime, readyTime) || other.readyTime == readyTime)&&(identical(other.deliveryLocationCode, deliveryLocationCode) || other.deliveryLocationCode == deliveryLocationCode)&&(identical(other.deliveryLocation, deliveryLocation) || other.deliveryLocation == deliveryLocation)&&(identical(other.selectedArea, selectedArea) || other.selectedArea == selectedArea));
}


@override
int get hashCode => Object.hash(runtimeType,isLoading,error,const DeepCollectionEquality().hash(productsWithQuantity),isDelivery,chargeToRoom,comment,readyTime,deliveryLocationCode,deliveryLocation,selectedArea);

@override
String toString() {
  return 'CartState(isLoading: $isLoading, error: $error, productsWithQuantity: $productsWithQuantity, isDelivery: $isDelivery, chargeToRoom: $chargeToRoom, comment: $comment, readyTime: $readyTime, deliveryLocationCode: $deliveryLocationCode, deliveryLocation: $deliveryLocation, selectedArea: $selectedArea)';
}


}

/// @nodoc
abstract mixin class $CartStateCopyWith<$Res>  {
  factory $CartStateCopyWith(CartState value, $Res Function(CartState) _then) = _$CartStateCopyWithImpl;
@useResult
$Res call({
 bool isLoading, AppError error, Map<int, ProductInCart> productsWithQuantity, bool isDelivery, bool chargeToRoom, String comment, String readyTime, String deliveryLocationCode, DeliveryLocation deliveryLocation, AreaDetails? selectedArea
});




}
/// @nodoc
class _$CartStateCopyWithImpl<$Res>
    implements $CartStateCopyWith<$Res> {
  _$CartStateCopyWithImpl(this._self, this._then);

  final CartState _self;
  final $Res Function(CartState) _then;

/// Create a copy of CartState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,Object? error = null,Object? productsWithQuantity = null,Object? isDelivery = null,Object? chargeToRoom = null,Object? comment = null,Object? readyTime = null,Object? deliveryLocationCode = null,Object? deliveryLocation = null,Object? selectedArea = freezed,}) {
  return _then(_self.copyWith(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,error: null == error ? _self.error : error // ignore: cast_nullable_to_non_nullable
as AppError,productsWithQuantity: null == productsWithQuantity ? _self.productsWithQuantity : productsWithQuantity // ignore: cast_nullable_to_non_nullable
as Map<int, ProductInCart>,isDelivery: null == isDelivery ? _self.isDelivery : isDelivery // ignore: cast_nullable_to_non_nullable
as bool,chargeToRoom: null == chargeToRoom ? _self.chargeToRoom : chargeToRoom // ignore: cast_nullable_to_non_nullable
as bool,comment: null == comment ? _self.comment : comment // ignore: cast_nullable_to_non_nullable
as String,readyTime: null == readyTime ? _self.readyTime : readyTime // ignore: cast_nullable_to_non_nullable
as String,deliveryLocationCode: null == deliveryLocationCode ? _self.deliveryLocationCode : deliveryLocationCode // ignore: cast_nullable_to_non_nullable
as String,deliveryLocation: null == deliveryLocation ? _self.deliveryLocation : deliveryLocation // ignore: cast_nullable_to_non_nullable
as DeliveryLocation,selectedArea: freezed == selectedArea ? _self.selectedArea : selectedArea // ignore: cast_nullable_to_non_nullable
as AreaDetails?,
  ));
}

}


/// Adds pattern-matching-related methods to [CartState].
extension CartStatePatterns on CartState {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case final Subclass value:
///     return ...;
///   case _:
///     return orElse();
/// }
/// ```

@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CartState value)?  $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CartState() when $default != null:
return $default(_that);case _:
  return orElse();

}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case final Subclass value:
///     return ...;
///   case final Subclass2 value:
///     return ...;
/// }
/// ```

@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CartState value)  $default,){
final _that = this;
switch (_that) {
case _CartState():
return $default(_that);case _:
  throw StateError('Unexpected subclass');

}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case final Subclass value:
///     return ...;
///   case _:
///     return null;
/// }
/// ```

@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CartState value)?  $default,){
final _that = this;
switch (_that) {
case _CartState() when $default != null:
return $default(_that);case _:
  return null;

}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case _:
///     return orElse();
/// }
/// ```

@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading,  AppError error,  Map<int, ProductInCart> productsWithQuantity,  bool isDelivery,  bool chargeToRoom,  String comment,  String readyTime,  String deliveryLocationCode,  DeliveryLocation deliveryLocation,  AreaDetails? selectedArea)?  $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CartState() when $default != null:
return $default(_that.isLoading,_that.error,_that.productsWithQuantity,_that.isDelivery,_that.chargeToRoom,_that.comment,_that.readyTime,_that.deliveryLocationCode,_that.deliveryLocation,_that.selectedArea);case _:
  return orElse();

}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case Subclass2(:final field2):
///     return ...;
/// }
/// ```

@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading,  AppError error,  Map<int, ProductInCart> productsWithQuantity,  bool isDelivery,  bool chargeToRoom,  String comment,  String readyTime,  String deliveryLocationCode,  DeliveryLocation deliveryLocation,  AreaDetails? selectedArea)  $default,) {final _that = this;
switch (_that) {
case _CartState():
return $default(_that.isLoading,_that.error,_that.productsWithQuantity,_that.isDelivery,_that.chargeToRoom,_that.comment,_that.readyTime,_that.deliveryLocationCode,_that.deliveryLocation,_that.selectedArea);case _:
  throw StateError('Unexpected subclass');

}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
///   case Subclass(:final field):
///     return ...;
///   case _:
///     return null;
/// }
/// ```

@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading,  AppError error,  Map<int, ProductInCart> productsWithQuantity,  bool isDelivery,  bool chargeToRoom,  String comment,  String readyTime,  String deliveryLocationCode,  DeliveryLocation deliveryLocation,  AreaDetails? selectedArea)?  $default,) {final _that = this;
switch (_that) {
case _CartState() when $default != null:
return $default(_that.isLoading,_that.error,_that.productsWithQuantity,_that.isDelivery,_that.chargeToRoom,_that.comment,_that.readyTime,_that.deliveryLocationCode,_that.deliveryLocation,_that.selectedArea);case _:
  return null;

}
}

}

/// @nodoc


class _CartState extends CartState {
  const _CartState({this.isLoading = false, this.error = AppError.none, final  Map<int, ProductInCart> productsWithQuantity = const {}, this.isDelivery = false, this.chargeToRoom = true, this.comment = "", this.readyTime = "", this.deliveryLocationCode = "", this.deliveryLocation = DeliveryLocation.room, this.selectedArea}): _productsWithQuantity = productsWithQuantity,super._();
  

@override@JsonKey() final  bool isLoading;
@override@JsonKey() final  AppError error;
 final  Map<int, ProductInCart> _productsWithQuantity;
@override@JsonKey() Map<int, ProductInCart> get productsWithQuantity {
  if (_productsWithQuantity is EqualUnmodifiableMapView) return _productsWithQuantity;
  // ignore: implicit_dynamic_type
  return EqualUnmodifiableMapView(_productsWithQuantity);
}

@override@JsonKey() final  bool isDelivery;
@override@JsonKey() final  bool chargeToRoom;
@override@JsonKey() final  String comment;
@override@JsonKey() final  String readyTime;
@override@JsonKey() final  String deliveryLocationCode;
@override@JsonKey() final  DeliveryLocation deliveryLocation;
@override final  AreaDetails? selectedArea;

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



@override
bool operator ==(Object other) {
  return identical(this, other) || (other.runtimeType == runtimeType&&other is _CartState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading)&&(identical(other.error, error) || other.error == error)&&const DeepCollectionEquality().equals(other._productsWithQuantity, _productsWithQuantity)&&(identical(other.isDelivery, isDelivery) || other.isDelivery == isDelivery)&&(identical(other.chargeToRoom, chargeToRoom) || other.chargeToRoom == chargeToRoom)&&(identical(other.comment, comment) || other.comment == comment)&&(identical(other.readyTime, readyTime) || other.readyTime == readyTime)&&(identical(other.deliveryLocationCode, deliveryLocationCode) || other.deliveryLocationCode == deliveryLocationCode)&&(identical(other.deliveryLocation, deliveryLocation) || other.deliveryLocation == deliveryLocation)&&(identical(other.selectedArea, selectedArea) || other.selectedArea == selectedArea));
}


@override
int get hashCode => Object.hash(runtimeType,isLoading,error,const DeepCollectionEquality().hash(_productsWithQuantity),isDelivery,chargeToRoom,comment,readyTime,deliveryLocationCode,deliveryLocation,selectedArea);

@override
String toString() {
  return 'CartState(isLoading: $isLoading, error: $error, productsWithQuantity: $productsWithQuantity, isDelivery: $isDelivery, chargeToRoom: $chargeToRoom, comment: $comment, readyTime: $readyTime, deliveryLocationCode: $deliveryLocationCode, deliveryLocation: $deliveryLocation, selectedArea: $selectedArea)';
}


}

/// @nodoc
abstract mixin class _$CartStateCopyWith<$Res> implements $CartStateCopyWith<$Res> {
  factory _$CartStateCopyWith(_CartState value, $Res Function(_CartState) _then) = __$CartStateCopyWithImpl;
@override @useResult
$Res call({
 bool isLoading, AppError error, Map<int, ProductInCart> productsWithQuantity, bool isDelivery, bool chargeToRoom, String comment, String readyTime, String deliveryLocationCode, DeliveryLocation deliveryLocation, AreaDetails? selectedArea
});




}
/// @nodoc
class __$CartStateCopyWithImpl<$Res>
    implements _$CartStateCopyWith<$Res> {
  __$CartStateCopyWithImpl(this._self, this._then);

  final _CartState _self;
  final $Res Function(_CartState) _then;

/// Create a copy of CartState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,Object? error = null,Object? productsWithQuantity = null,Object? isDelivery = null,Object? chargeToRoom = null,Object? comment = null,Object? readyTime = null,Object? deliveryLocationCode = null,Object? deliveryLocation = null,Object? selectedArea = freezed,}) {
  return _then(_CartState(
isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
as bool,error: null == error ? _self.error : error // ignore: cast_nullable_to_non_nullable
as AppError,productsWithQuantity: null == productsWithQuantity ? _self._productsWithQuantity : productsWithQuantity // ignore: cast_nullable_to_non_nullable
as Map<int, ProductInCart>,isDelivery: null == isDelivery ? _self.isDelivery : isDelivery // ignore: cast_nullable_to_non_nullable
as bool,chargeToRoom: null == chargeToRoom ? _self.chargeToRoom : chargeToRoom // ignore: cast_nullable_to_non_nullable
as bool,comment: null == comment ? _self.comment : comment // ignore: cast_nullable_to_non_nullable
as String,readyTime: null == readyTime ? _self.readyTime : readyTime // ignore: cast_nullable_to_non_nullable
as String,deliveryLocationCode: null == deliveryLocationCode ? _self.deliveryLocationCode : deliveryLocationCode // ignore: cast_nullable_to_non_nullable
as String,deliveryLocation: null == deliveryLocation ? _self.deliveryLocation : deliveryLocation // ignore: cast_nullable_to_non_nullable
as DeliveryLocation,selectedArea: freezed == selectedArea ? _self.selectedArea : selectedArea // ignore: cast_nullable_to_non_nullable
as AreaDetails?,
  ));
}


}

// dart format on