// 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 'order_loader_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 _$OrderLoaderEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $OrderLoaderEventCopyWith<$Res> {
  factory $OrderLoaderEventCopyWith(
    OrderLoaderEvent value,
    $Res Function(OrderLoaderEvent) then,
  ) = _$OrderLoaderEventCopyWithImpl<$Res, OrderLoaderEvent>;
}

/// @nodoc
class _$OrderLoaderEventCopyWithImpl<$Res, $Val extends OrderLoaderEvent>
    implements $OrderLoaderEventCopyWith<$Res> {
  _$OrderLoaderEventCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$DateTimeRangeChangeImplCopyWith<$Res> {
  factory _$$DateTimeRangeChangeImplCopyWith(
    _$DateTimeRangeChangeImpl value,
    $Res Function(_$DateTimeRangeChangeImpl) then,
  ) = __$$DateTimeRangeChangeImplCopyWithImpl<$Res>;
  @useResult
  $Res call({DateTime startDate, DateTime endDate});
}

/// @nodoc
class __$$DateTimeRangeChangeImplCopyWithImpl<$Res>
    extends _$OrderLoaderEventCopyWithImpl<$Res, _$DateTimeRangeChangeImpl>
    implements _$$DateTimeRangeChangeImplCopyWith<$Res> {
  __$$DateTimeRangeChangeImplCopyWithImpl(
    _$DateTimeRangeChangeImpl _value,
    $Res Function(_$DateTimeRangeChangeImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$DateTimeRangeChangeImpl implements _DateTimeRangeChange {
  const _$DateTimeRangeChangeImpl(this.startDate, this.endDate);

  @override
  final DateTime startDate;
  @override
  final DateTime endDate;

  @override
  String toString() {
    return 'OrderLoaderEvent.dateTimeRangeChange(startDate: $startDate, endDate: $endDate)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) {
    return dateTimeRangeChange(startDate, endDate);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) {
    return dateTimeRangeChange?.call(startDate, endDate);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) {
    if (dateTimeRangeChange != null) {
      return dateTimeRangeChange(startDate, endDate);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) {
    return dateTimeRangeChange(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) {
    return dateTimeRangeChange?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) {
    if (dateTimeRangeChange != null) {
      return dateTimeRangeChange(this);
    }
    return orElse();
  }
}

abstract class _DateTimeRangeChange implements OrderLoaderEvent {
  const factory _DateTimeRangeChange(
    final DateTime startDate,
    final DateTime endDate,
  ) = _$DateTimeRangeChangeImpl;

  DateTime get startDate;
  DateTime get endDate;

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

/// @nodoc
abstract class _$$SearchChangeImplCopyWith<$Res> {
  factory _$$SearchChangeImplCopyWith(
    _$SearchChangeImpl value,
    $Res Function(_$SearchChangeImpl) then,
  ) = __$$SearchChangeImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String search});
}

/// @nodoc
class __$$SearchChangeImplCopyWithImpl<$Res>
    extends _$OrderLoaderEventCopyWithImpl<$Res, _$SearchChangeImpl>
    implements _$$SearchChangeImplCopyWith<$Res> {
  __$$SearchChangeImplCopyWithImpl(
    _$SearchChangeImpl _value,
    $Res Function(_$SearchChangeImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$SearchChangeImpl implements _SearchChange {
  const _$SearchChangeImpl(this.search);

  @override
  final String search;

  @override
  String toString() {
    return 'OrderLoaderEvent.searchChange(search: $search)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) {
    return searchChange(search);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) {
    return searchChange?.call(search);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) {
    if (searchChange != null) {
      return searchChange(search);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) {
    return searchChange(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) {
    return searchChange?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) {
    if (searchChange != null) {
      return searchChange(this);
    }
    return orElse();
  }
}

abstract class _SearchChange implements OrderLoaderEvent {
  const factory _SearchChange(final String search) = _$SearchChangeImpl;

  String get search;

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

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

  $OrderCopyWith<$Res> get order;
}

/// @nodoc
class __$$SetSelectedOrderImplCopyWithImpl<$Res>
    extends _$OrderLoaderEventCopyWithImpl<$Res, _$SetSelectedOrderImpl>
    implements _$$SetSelectedOrderImplCopyWith<$Res> {
  __$$SetSelectedOrderImplCopyWithImpl(
    _$SetSelectedOrderImpl _value,
    $Res Function(_$SetSelectedOrderImpl) _then,
  ) : super(_value, _then);

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

  /// Create a copy of OrderLoaderEvent
  /// 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 _$SetSelectedOrderImpl implements _SetSelectedOrder {
  const _$SetSelectedOrderImpl(this.order);

  @override
  final Order order;

  @override
  String toString() {
    return 'OrderLoaderEvent.setSelectedOrder(order: $order)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) {
    return setSelectedOrder(order);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) {
    return setSelectedOrder?.call(order);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) {
    if (setSelectedOrder != null) {
      return setSelectedOrder(order);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) {
    return setSelectedOrder(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) {
    return setSelectedOrder?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) {
    if (setSelectedOrder != null) {
      return setSelectedOrder(this);
    }
    return orElse();
  }
}

abstract class _SetSelectedOrder implements OrderLoaderEvent {
  const factory _SetSelectedOrder(final Order order) = _$SetSelectedOrderImpl;

  Order get order;

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

/// @nodoc
abstract class _$$GetByIdImplCopyWith<$Res> {
  factory _$$GetByIdImplCopyWith(
    _$GetByIdImpl value,
    $Res Function(_$GetByIdImpl) then,
  ) = __$$GetByIdImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String id});
}

/// @nodoc
class __$$GetByIdImplCopyWithImpl<$Res>
    extends _$OrderLoaderEventCopyWithImpl<$Res, _$GetByIdImpl>
    implements _$$GetByIdImplCopyWith<$Res> {
  __$$GetByIdImplCopyWithImpl(
    _$GetByIdImpl _value,
    $Res Function(_$GetByIdImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$GetByIdImpl implements _GetById {
  const _$GetByIdImpl(this.id);

  @override
  final String id;

  @override
  String toString() {
    return 'OrderLoaderEvent.getById(id: $id)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) {
    return getById(id);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) {
    return getById?.call(id);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) {
    if (getById != null) {
      return getById(id);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) {
    return getById(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) {
    return getById?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) {
    if (getById != null) {
      return getById(this);
    }
    return orElse();
  }
}

abstract class _GetById implements OrderLoaderEvent {
  const factory _GetById(final String id) = _$GetByIdImpl;

  String get id;

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

/// @nodoc
abstract class _$$FetchedImplCopyWith<$Res> {
  factory _$$FetchedImplCopyWith(
    _$FetchedImpl value,
    $Res Function(_$FetchedImpl) then,
  ) = __$$FetchedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({bool isRefresh, String status});
}

/// @nodoc
class __$$FetchedImplCopyWithImpl<$Res>
    extends _$OrderLoaderEventCopyWithImpl<$Res, _$FetchedImpl>
    implements _$$FetchedImplCopyWith<$Res> {
  __$$FetchedImplCopyWithImpl(
    _$FetchedImpl _value,
    $Res Function(_$FetchedImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$FetchedImpl implements _Fetched {
  const _$FetchedImpl({this.isRefresh = false, required this.status});

  @override
  @JsonKey()
  final bool isRefresh;
  @override
  final String status;

  @override
  String toString() {
    return 'OrderLoaderEvent.fetched(isRefresh: $isRefresh, status: $status)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(DateTime startDate, DateTime endDate)
    dateTimeRangeChange,
    required TResult Function(String search) searchChange,
    required TResult Function(Order order) setSelectedOrder,
    required TResult Function(String id) getById,
    required TResult Function(bool isRefresh, String status) fetched,
  }) {
    return fetched(isRefresh, status);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(DateTime startDate, DateTime endDate)?
    dateTimeRangeChange,
    TResult? Function(String search)? searchChange,
    TResult? Function(Order order)? setSelectedOrder,
    TResult? Function(String id)? getById,
    TResult? Function(bool isRefresh, String status)? fetched,
  }) {
    return fetched?.call(isRefresh, status);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(DateTime startDate, DateTime endDate)? dateTimeRangeChange,
    TResult Function(String search)? searchChange,
    TResult Function(Order order)? setSelectedOrder,
    TResult Function(String id)? getById,
    TResult Function(bool isRefresh, String status)? fetched,
    required TResult orElse(),
  }) {
    if (fetched != null) {
      return fetched(isRefresh, status);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_DateTimeRangeChange value) dateTimeRangeChange,
    required TResult Function(_SearchChange value) searchChange,
    required TResult Function(_SetSelectedOrder value) setSelectedOrder,
    required TResult Function(_GetById value) getById,
    required TResult Function(_Fetched value) fetched,
  }) {
    return fetched(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult? Function(_SearchChange value)? searchChange,
    TResult? Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult? Function(_GetById value)? getById,
    TResult? Function(_Fetched value)? fetched,
  }) {
    return fetched?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_DateTimeRangeChange value)? dateTimeRangeChange,
    TResult Function(_SearchChange value)? searchChange,
    TResult Function(_SetSelectedOrder value)? setSelectedOrder,
    TResult Function(_GetById value)? getById,
    TResult Function(_Fetched value)? fetched,
    required TResult orElse(),
  }) {
    if (fetched != null) {
      return fetched(this);
    }
    return orElse();
  }
}

abstract class _Fetched implements OrderLoaderEvent {
  const factory _Fetched({final bool isRefresh, required final String status}) =
      _$FetchedImpl;

  bool get isRefresh;
  String get status;

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

/// @nodoc
mixin _$OrderLoaderState {
  List<Order> get orders => throw _privateConstructorUsedError;
  Option<OrderFailure> get failureOption => throw _privateConstructorUsedError;
  Option<OrderFailure> get failureOptionGetById =>
      throw _privateConstructorUsedError;
  Order get order => throw _privateConstructorUsedError;
  Order? get selectedOrder => throw _privateConstructorUsedError;
  String? get search => throw _privateConstructorUsedError;
  DateTime get startDate => throw _privateConstructorUsedError;
  DateTime get endDate => throw _privateConstructorUsedError;
  int get totalOrder => throw _privateConstructorUsedError;
  bool get isFetching => throw _privateConstructorUsedError;
  bool get isFetchingById => throw _privateConstructorUsedError;
  bool get hasReachedMax => throw _privateConstructorUsedError;
  int get page => throw _privateConstructorUsedError;

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

/// @nodoc
abstract class $OrderLoaderStateCopyWith<$Res> {
  factory $OrderLoaderStateCopyWith(
    OrderLoaderState value,
    $Res Function(OrderLoaderState) then,
  ) = _$OrderLoaderStateCopyWithImpl<$Res, OrderLoaderState>;
  @useResult
  $Res call({
    List<Order> orders,
    Option<OrderFailure> failureOption,
    Option<OrderFailure> failureOptionGetById,
    Order order,
    Order? selectedOrder,
    String? search,
    DateTime startDate,
    DateTime endDate,
    int totalOrder,
    bool isFetching,
    bool isFetchingById,
    bool hasReachedMax,
    int page,
  });

  $OrderCopyWith<$Res> get order;
  $OrderCopyWith<$Res>? get selectedOrder;
}

/// @nodoc
class _$OrderLoaderStateCopyWithImpl<$Res, $Val extends OrderLoaderState>
    implements $OrderLoaderStateCopyWith<$Res> {
  _$OrderLoaderStateCopyWithImpl(this._value, this._then);

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

  /// Create a copy of OrderLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? orders = null,
    Object? failureOption = null,
    Object? failureOptionGetById = null,
    Object? order = null,
    Object? selectedOrder = freezed,
    Object? search = freezed,
    Object? startDate = null,
    Object? endDate = null,
    Object? totalOrder = null,
    Object? isFetching = null,
    Object? isFetchingById = null,
    Object? hasReachedMax = null,
    Object? page = null,
  }) {
    return _then(
      _value.copyWith(
            orders: null == orders
                ? _value.orders
                : orders // ignore: cast_nullable_to_non_nullable
                      as List<Order>,
            failureOption: null == failureOption
                ? _value.failureOption
                : failureOption // ignore: cast_nullable_to_non_nullable
                      as Option<OrderFailure>,
            failureOptionGetById: null == failureOptionGetById
                ? _value.failureOptionGetById
                : failureOptionGetById // ignore: cast_nullable_to_non_nullable
                      as Option<OrderFailure>,
            order: null == order
                ? _value.order
                : order // ignore: cast_nullable_to_non_nullable
                      as Order,
            selectedOrder: freezed == selectedOrder
                ? _value.selectedOrder
                : selectedOrder // ignore: cast_nullable_to_non_nullable
                      as Order?,
            search: freezed == search
                ? _value.search
                : search // ignore: cast_nullable_to_non_nullable
                      as String?,
            startDate: null == startDate
                ? _value.startDate
                : startDate // ignore: cast_nullable_to_non_nullable
                      as DateTime,
            endDate: null == endDate
                ? _value.endDate
                : endDate // ignore: cast_nullable_to_non_nullable
                      as DateTime,
            totalOrder: null == totalOrder
                ? _value.totalOrder
                : totalOrder // ignore: cast_nullable_to_non_nullable
                      as int,
            isFetching: null == isFetching
                ? _value.isFetching
                : isFetching // ignore: cast_nullable_to_non_nullable
                      as bool,
            isFetchingById: null == isFetchingById
                ? _value.isFetchingById
                : isFetchingById // ignore: cast_nullable_to_non_nullable
                      as bool,
            hasReachedMax: null == hasReachedMax
                ? _value.hasReachedMax
                : hasReachedMax // ignore: cast_nullable_to_non_nullable
                      as bool,
            page: null == page
                ? _value.page
                : page // ignore: cast_nullable_to_non_nullable
                      as int,
          )
          as $Val,
    );
  }

  /// Create a copy of OrderLoaderState
  /// 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);
    });
  }

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

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

/// @nodoc
abstract class _$$OrderLoaderStateImplCopyWith<$Res>
    implements $OrderLoaderStateCopyWith<$Res> {
  factory _$$OrderLoaderStateImplCopyWith(
    _$OrderLoaderStateImpl value,
    $Res Function(_$OrderLoaderStateImpl) then,
  ) = __$$OrderLoaderStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    List<Order> orders,
    Option<OrderFailure> failureOption,
    Option<OrderFailure> failureOptionGetById,
    Order order,
    Order? selectedOrder,
    String? search,
    DateTime startDate,
    DateTime endDate,
    int totalOrder,
    bool isFetching,
    bool isFetchingById,
    bool hasReachedMax,
    int page,
  });

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

/// @nodoc
class __$$OrderLoaderStateImplCopyWithImpl<$Res>
    extends _$OrderLoaderStateCopyWithImpl<$Res, _$OrderLoaderStateImpl>
    implements _$$OrderLoaderStateImplCopyWith<$Res> {
  __$$OrderLoaderStateImplCopyWithImpl(
    _$OrderLoaderStateImpl _value,
    $Res Function(_$OrderLoaderStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of OrderLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? orders = null,
    Object? failureOption = null,
    Object? failureOptionGetById = null,
    Object? order = null,
    Object? selectedOrder = freezed,
    Object? search = freezed,
    Object? startDate = null,
    Object? endDate = null,
    Object? totalOrder = null,
    Object? isFetching = null,
    Object? isFetchingById = null,
    Object? hasReachedMax = null,
    Object? page = null,
  }) {
    return _then(
      _$OrderLoaderStateImpl(
        orders: null == orders
            ? _value._orders
            : orders // ignore: cast_nullable_to_non_nullable
                  as List<Order>,
        failureOption: null == failureOption
            ? _value.failureOption
            : failureOption // ignore: cast_nullable_to_non_nullable
                  as Option<OrderFailure>,
        failureOptionGetById: null == failureOptionGetById
            ? _value.failureOptionGetById
            : failureOptionGetById // ignore: cast_nullable_to_non_nullable
                  as Option<OrderFailure>,
        order: null == order
            ? _value.order
            : order // ignore: cast_nullable_to_non_nullable
                  as Order,
        selectedOrder: freezed == selectedOrder
            ? _value.selectedOrder
            : selectedOrder // ignore: cast_nullable_to_non_nullable
                  as Order?,
        search: freezed == search
            ? _value.search
            : search // ignore: cast_nullable_to_non_nullable
                  as String?,
        startDate: null == startDate
            ? _value.startDate
            : startDate // ignore: cast_nullable_to_non_nullable
                  as DateTime,
        endDate: null == endDate
            ? _value.endDate
            : endDate // ignore: cast_nullable_to_non_nullable
                  as DateTime,
        totalOrder: null == totalOrder
            ? _value.totalOrder
            : totalOrder // ignore: cast_nullable_to_non_nullable
                  as int,
        isFetching: null == isFetching
            ? _value.isFetching
            : isFetching // ignore: cast_nullable_to_non_nullable
                  as bool,
        isFetchingById: null == isFetchingById
            ? _value.isFetchingById
            : isFetchingById // ignore: cast_nullable_to_non_nullable
                  as bool,
        hasReachedMax: null == hasReachedMax
            ? _value.hasReachedMax
            : hasReachedMax // ignore: cast_nullable_to_non_nullable
                  as bool,
        page: null == page
            ? _value.page
            : page // ignore: cast_nullable_to_non_nullable
                  as int,
      ),
    );
  }
}

/// @nodoc

class _$OrderLoaderStateImpl implements _OrderLoaderState {
  _$OrderLoaderStateImpl({
    required final List<Order> orders,
    required this.failureOption,
    required this.failureOptionGetById,
    required this.order,
    this.selectedOrder,
    this.search,
    required this.startDate,
    required this.endDate,
    this.totalOrder = 0,
    this.isFetching = false,
    this.isFetchingById = false,
    this.hasReachedMax = false,
    this.page = 1,
  }) : _orders = orders;

  final List<Order> _orders;
  @override
  List<Order> get orders {
    if (_orders is EqualUnmodifiableListView) return _orders;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_orders);
  }

  @override
  final Option<OrderFailure> failureOption;
  @override
  final Option<OrderFailure> failureOptionGetById;
  @override
  final Order order;
  @override
  final Order? selectedOrder;
  @override
  final String? search;
  @override
  final DateTime startDate;
  @override
  final DateTime endDate;
  @override
  @JsonKey()
  final int totalOrder;
  @override
  @JsonKey()
  final bool isFetching;
  @override
  @JsonKey()
  final bool isFetchingById;
  @override
  @JsonKey()
  final bool hasReachedMax;
  @override
  @JsonKey()
  final int page;

  @override
  String toString() {
    return 'OrderLoaderState(orders: $orders, failureOption: $failureOption, failureOptionGetById: $failureOptionGetById, order: $order, selectedOrder: $selectedOrder, search: $search, startDate: $startDate, endDate: $endDate, totalOrder: $totalOrder, isFetching: $isFetching, isFetchingById: $isFetchingById, hasReachedMax: $hasReachedMax, page: $page)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$OrderLoaderStateImpl &&
            const DeepCollectionEquality().equals(other._orders, _orders) &&
            (identical(other.failureOption, failureOption) ||
                other.failureOption == failureOption) &&
            (identical(other.failureOptionGetById, failureOptionGetById) ||
                other.failureOptionGetById == failureOptionGetById) &&
            (identical(other.order, order) || other.order == order) &&
            (identical(other.selectedOrder, selectedOrder) ||
                other.selectedOrder == selectedOrder) &&
            (identical(other.search, search) || other.search == search) &&
            (identical(other.startDate, startDate) ||
                other.startDate == startDate) &&
            (identical(other.endDate, endDate) || other.endDate == endDate) &&
            (identical(other.totalOrder, totalOrder) ||
                other.totalOrder == totalOrder) &&
            (identical(other.isFetching, isFetching) ||
                other.isFetching == isFetching) &&
            (identical(other.isFetchingById, isFetchingById) ||
                other.isFetchingById == isFetchingById) &&
            (identical(other.hasReachedMax, hasReachedMax) ||
                other.hasReachedMax == hasReachedMax) &&
            (identical(other.page, page) || other.page == page));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    const DeepCollectionEquality().hash(_orders),
    failureOption,
    failureOptionGetById,
    order,
    selectedOrder,
    search,
    startDate,
    endDate,
    totalOrder,
    isFetching,
    isFetchingById,
    hasReachedMax,
    page,
  );

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

abstract class _OrderLoaderState implements OrderLoaderState {
  factory _OrderLoaderState({
    required final List<Order> orders,
    required final Option<OrderFailure> failureOption,
    required final Option<OrderFailure> failureOptionGetById,
    required final Order order,
    final Order? selectedOrder,
    final String? search,
    required final DateTime startDate,
    required final DateTime endDate,
    final int totalOrder,
    final bool isFetching,
    final bool isFetchingById,
    final bool hasReachedMax,
    final int page,
  }) = _$OrderLoaderStateImpl;

  @override
  List<Order> get orders;
  @override
  Option<OrderFailure> get failureOption;
  @override
  Option<OrderFailure> get failureOptionGetById;
  @override
  Order get order;
  @override
  Order? get selectedOrder;
  @override
  String? get search;
  @override
  DateTime get startDate;
  @override
  DateTime get endDate;
  @override
  int get totalOrder;
  @override
  bool get isFetching;
  @override
  bool get isFetchingById;
  @override
  bool get hasReachedMax;
  @override
  int get page;

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