// 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 'category_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 _$CategoryLoaderEvent {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) => throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) => throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CategoryLoaderEventCopyWith<$Res> {
  factory $CategoryLoaderEventCopyWith(
    CategoryLoaderEvent value,
    $Res Function(CategoryLoaderEvent) then,
  ) = _$CategoryLoaderEventCopyWithImpl<$Res, CategoryLoaderEvent>;
}

/// @nodoc
class _$CategoryLoaderEventCopyWithImpl<$Res, $Val extends CategoryLoaderEvent>
    implements $CategoryLoaderEventCopyWith<$Res> {
  _$CategoryLoaderEventCopyWithImpl(this._value, this._then);

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

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

/// @nodoc
abstract class _$$GetCategoriesImplCopyWith<$Res> {
  factory _$$GetCategoriesImplCopyWith(
    _$GetCategoriesImpl value,
    $Res Function(_$GetCategoriesImpl) then,
  ) = __$$GetCategoriesImplCopyWithImpl<$Res>;
  @useResult
  $Res call({bool isActive, String? search, bool forceRemote});
}

/// @nodoc
class __$$GetCategoriesImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$GetCategoriesImpl>
    implements _$$GetCategoriesImplCopyWith<$Res> {
  __$$GetCategoriesImplCopyWithImpl(
    _$GetCategoriesImpl _value,
    $Res Function(_$GetCategoriesImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$GetCategoriesImpl implements _GetCategories {
  const _$GetCategoriesImpl({
    this.isActive = true,
    this.search,
    this.forceRemote = false,
  });

  @override
  @JsonKey()
  final bool isActive;
  @override
  final String? search;
  @override
  @JsonKey()
  final bool forceRemote;

  @override
  String toString() {
    return 'CategoryLoaderEvent.getCategories(isActive: $isActive, search: $search, forceRemote: $forceRemote)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return getCategories(isActive, this.search, forceRemote);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return getCategories?.call(isActive, this.search, forceRemote);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (getCategories != null) {
      return getCategories(isActive, this.search, forceRemote);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return getCategories(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return getCategories?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (getCategories != null) {
      return getCategories(this);
    }
    return orElse();
  }
}

abstract class _GetCategories implements CategoryLoaderEvent {
  const factory _GetCategories({
    final bool isActive,
    final String? search,
    final bool forceRemote,
  }) = _$GetCategoriesImpl;

  bool get isActive;
  String? get search;
  bool get forceRemote;

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

/// @nodoc
abstract class _$$LoadMoreImplCopyWith<$Res> {
  factory _$$LoadMoreImplCopyWith(
    _$LoadMoreImpl value,
    $Res Function(_$LoadMoreImpl) then,
  ) = __$$LoadMoreImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$LoadMoreImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$LoadMoreImpl>
    implements _$$LoadMoreImplCopyWith<$Res> {
  __$$LoadMoreImplCopyWithImpl(
    _$LoadMoreImpl _value,
    $Res Function(_$LoadMoreImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$LoadMoreImpl implements _LoadMore {
  const _$LoadMoreImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.loadMore()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return loadMore();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return loadMore?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (loadMore != null) {
      return loadMore();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return loadMore(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return loadMore?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (loadMore != null) {
      return loadMore(this);
    }
    return orElse();
  }
}

abstract class _LoadMore implements CategoryLoaderEvent {
  const factory _LoadMore() = _$LoadMoreImpl;
}

/// @nodoc
abstract class _$$RefreshImplCopyWith<$Res> {
  factory _$$RefreshImplCopyWith(
    _$RefreshImpl value,
    $Res Function(_$RefreshImpl) then,
  ) = __$$RefreshImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$RefreshImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$RefreshImpl>
    implements _$$RefreshImplCopyWith<$Res> {
  __$$RefreshImplCopyWithImpl(
    _$RefreshImpl _value,
    $Res Function(_$RefreshImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$RefreshImpl implements _Refresh {
  const _$RefreshImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.refresh()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return refresh();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return refresh?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (refresh != null) {
      return refresh();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return refresh(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return refresh?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (refresh != null) {
      return refresh(this);
    }
    return orElse();
  }
}

abstract class _Refresh implements CategoryLoaderEvent {
  const factory _Refresh() = _$RefreshImpl;
}

/// @nodoc
abstract class _$$SearchImplCopyWith<$Res> {
  factory _$$SearchImplCopyWith(
    _$SearchImpl value,
    $Res Function(_$SearchImpl) then,
  ) = __$$SearchImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String query, bool isActive});
}

/// @nodoc
class __$$SearchImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$SearchImpl>
    implements _$$SearchImplCopyWith<$Res> {
  __$$SearchImplCopyWithImpl(
    _$SearchImpl _value,
    $Res Function(_$SearchImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$SearchImpl implements _Search {
  const _$SearchImpl({required this.query, this.isActive = true});

  @override
  final String query;
  @override
  @JsonKey()
  final bool isActive;

  @override
  String toString() {
    return 'CategoryLoaderEvent.search(query: $query, isActive: $isActive)';
  }

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

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

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

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return search(query, isActive);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return search?.call(query, isActive);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (search != null) {
      return search(query, isActive);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return search(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return search?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (search != null) {
      return search(this);
    }
    return orElse();
  }
}

abstract class _Search implements CategoryLoaderEvent {
  const factory _Search({required final String query, final bool isActive}) =
      _$SearchImpl;

  String get query;
  bool get isActive;

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

/// @nodoc
abstract class _$$SyncAllImplCopyWith<$Res> {
  factory _$$SyncAllImplCopyWith(
    _$SyncAllImpl value,
    $Res Function(_$SyncAllImpl) then,
  ) = __$$SyncAllImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$SyncAllImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$SyncAllImpl>
    implements _$$SyncAllImplCopyWith<$Res> {
  __$$SyncAllImplCopyWithImpl(
    _$SyncAllImpl _value,
    $Res Function(_$SyncAllImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$SyncAllImpl implements _SyncAll {
  const _$SyncAllImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.syncAll()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return syncAll();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return syncAll?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (syncAll != null) {
      return syncAll();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return syncAll(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return syncAll?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (syncAll != null) {
      return syncAll(this);
    }
    return orElse();
  }
}

abstract class _SyncAll implements CategoryLoaderEvent {
  const factory _SyncAll() = _$SyncAllImpl;
}

/// @nodoc
abstract class _$$GetAllCategoriesImplCopyWith<$Res> {
  factory _$$GetAllCategoriesImplCopyWith(
    _$GetAllCategoriesImpl value,
    $Res Function(_$GetAllCategoriesImpl) then,
  ) = __$$GetAllCategoriesImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$GetAllCategoriesImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$GetAllCategoriesImpl>
    implements _$$GetAllCategoriesImplCopyWith<$Res> {
  __$$GetAllCategoriesImplCopyWithImpl(
    _$GetAllCategoriesImpl _value,
    $Res Function(_$GetAllCategoriesImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$GetAllCategoriesImpl implements _GetAllCategories {
  const _$GetAllCategoriesImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.getAllCategories()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return getAllCategories();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return getAllCategories?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (getAllCategories != null) {
      return getAllCategories();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return getAllCategories(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return getAllCategories?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (getAllCategories != null) {
      return getAllCategories(this);
    }
    return orElse();
  }
}

abstract class _GetAllCategories implements CategoryLoaderEvent {
  const factory _GetAllCategories() = _$GetAllCategoriesImpl;
}

/// @nodoc
abstract class _$$GetDatabaseStatsImplCopyWith<$Res> {
  factory _$$GetDatabaseStatsImplCopyWith(
    _$GetDatabaseStatsImpl value,
    $Res Function(_$GetDatabaseStatsImpl) then,
  ) = __$$GetDatabaseStatsImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$GetDatabaseStatsImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$GetDatabaseStatsImpl>
    implements _$$GetDatabaseStatsImplCopyWith<$Res> {
  __$$GetDatabaseStatsImplCopyWithImpl(
    _$GetDatabaseStatsImpl _value,
    $Res Function(_$GetDatabaseStatsImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$GetDatabaseStatsImpl implements _GetDatabaseStats {
  const _$GetDatabaseStatsImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.getDatabaseStats()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return getDatabaseStats();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return getDatabaseStats?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (getDatabaseStats != null) {
      return getDatabaseStats();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return getDatabaseStats(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return getDatabaseStats?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (getDatabaseStats != null) {
      return getDatabaseStats(this);
    }
    return orElse();
  }
}

abstract class _GetDatabaseStats implements CategoryLoaderEvent {
  const factory _GetDatabaseStats() = _$GetDatabaseStatsImpl;
}

/// @nodoc
abstract class _$$ClearCacheImplCopyWith<$Res> {
  factory _$$ClearCacheImplCopyWith(
    _$ClearCacheImpl value,
    $Res Function(_$ClearCacheImpl) then,
  ) = __$$ClearCacheImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$ClearCacheImplCopyWithImpl<$Res>
    extends _$CategoryLoaderEventCopyWithImpl<$Res, _$ClearCacheImpl>
    implements _$$ClearCacheImplCopyWith<$Res> {
  __$$ClearCacheImplCopyWithImpl(
    _$ClearCacheImpl _value,
    $Res Function(_$ClearCacheImpl) _then,
  ) : super(_value, _then);

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

/// @nodoc

class _$ClearCacheImpl implements _ClearCache {
  const _$ClearCacheImpl();

  @override
  String toString() {
    return 'CategoryLoaderEvent.clearCache()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function(bool isActive, String? search, bool forceRemote)
    getCategories,
    required TResult Function() loadMore,
    required TResult Function() refresh,
    required TResult Function(String query, bool isActive) search,
    required TResult Function() syncAll,
    required TResult Function() getAllCategories,
    required TResult Function() getDatabaseStats,
    required TResult Function() clearCache,
  }) {
    return clearCache();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult? Function()? loadMore,
    TResult? Function()? refresh,
    TResult? Function(String query, bool isActive)? search,
    TResult? Function()? syncAll,
    TResult? Function()? getAllCategories,
    TResult? Function()? getDatabaseStats,
    TResult? Function()? clearCache,
  }) {
    return clearCache?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function(bool isActive, String? search, bool forceRemote)?
    getCategories,
    TResult Function()? loadMore,
    TResult Function()? refresh,
    TResult Function(String query, bool isActive)? search,
    TResult Function()? syncAll,
    TResult Function()? getAllCategories,
    TResult Function()? getDatabaseStats,
    TResult Function()? clearCache,
    required TResult orElse(),
  }) {
    if (clearCache != null) {
      return clearCache();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_GetCategories value) getCategories,
    required TResult Function(_LoadMore value) loadMore,
    required TResult Function(_Refresh value) refresh,
    required TResult Function(_Search value) search,
    required TResult Function(_SyncAll value) syncAll,
    required TResult Function(_GetAllCategories value) getAllCategories,
    required TResult Function(_GetDatabaseStats value) getDatabaseStats,
    required TResult Function(_ClearCache value) clearCache,
  }) {
    return clearCache(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_GetCategories value)? getCategories,
    TResult? Function(_LoadMore value)? loadMore,
    TResult? Function(_Refresh value)? refresh,
    TResult? Function(_Search value)? search,
    TResult? Function(_SyncAll value)? syncAll,
    TResult? Function(_GetAllCategories value)? getAllCategories,
    TResult? Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult? Function(_ClearCache value)? clearCache,
  }) {
    return clearCache?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_GetCategories value)? getCategories,
    TResult Function(_LoadMore value)? loadMore,
    TResult Function(_Refresh value)? refresh,
    TResult Function(_Search value)? search,
    TResult Function(_SyncAll value)? syncAll,
    TResult Function(_GetAllCategories value)? getAllCategories,
    TResult Function(_GetDatabaseStats value)? getDatabaseStats,
    TResult Function(_ClearCache value)? clearCache,
    required TResult orElse(),
  }) {
    if (clearCache != null) {
      return clearCache(this);
    }
    return orElse();
  }
}

abstract class _ClearCache implements CategoryLoaderEvent {
  const factory _ClearCache() = _$ClearCacheImpl;
}

/// @nodoc
mixin _$CategoryLoaderState {
  List<Category> get categories => throw _privateConstructorUsedError;
  Option<CategoryFailure> get failureOptionCategory =>
      throw _privateConstructorUsedError;
  bool get hasReachedMax => throw _privateConstructorUsedError;
  int get page => throw _privateConstructorUsedError;
  bool get isLoadingMore => throw _privateConstructorUsedError;
  String? get searchQuery => throw _privateConstructorUsedError;

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

/// @nodoc
abstract class $CategoryLoaderStateCopyWith<$Res> {
  factory $CategoryLoaderStateCopyWith(
    CategoryLoaderState value,
    $Res Function(CategoryLoaderState) then,
  ) = _$CategoryLoaderStateCopyWithImpl<$Res, CategoryLoaderState>;
  @useResult
  $Res call({
    List<Category> categories,
    Option<CategoryFailure> failureOptionCategory,
    bool hasReachedMax,
    int page,
    bool isLoadingMore,
    String? searchQuery,
  });
}

/// @nodoc
class _$CategoryLoaderStateCopyWithImpl<$Res, $Val extends CategoryLoaderState>
    implements $CategoryLoaderStateCopyWith<$Res> {
  _$CategoryLoaderStateCopyWithImpl(this._value, this._then);

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

  /// Create a copy of CategoryLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? categories = null,
    Object? failureOptionCategory = null,
    Object? hasReachedMax = null,
    Object? page = null,
    Object? isLoadingMore = null,
    Object? searchQuery = freezed,
  }) {
    return _then(
      _value.copyWith(
            categories: null == categories
                ? _value.categories
                : categories // ignore: cast_nullable_to_non_nullable
                      as List<Category>,
            failureOptionCategory: null == failureOptionCategory
                ? _value.failureOptionCategory
                : failureOptionCategory // ignore: cast_nullable_to_non_nullable
                      as Option<CategoryFailure>,
            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,
            isLoadingMore: null == isLoadingMore
                ? _value.isLoadingMore
                : isLoadingMore // ignore: cast_nullable_to_non_nullable
                      as bool,
            searchQuery: freezed == searchQuery
                ? _value.searchQuery
                : searchQuery // ignore: cast_nullable_to_non_nullable
                      as String?,
          )
          as $Val,
    );
  }
}

/// @nodoc
abstract class _$$CategoryLoaderStateImplCopyWith<$Res>
    implements $CategoryLoaderStateCopyWith<$Res> {
  factory _$$CategoryLoaderStateImplCopyWith(
    _$CategoryLoaderStateImpl value,
    $Res Function(_$CategoryLoaderStateImpl) then,
  ) = __$$CategoryLoaderStateImplCopyWithImpl<$Res>;
  @override
  @useResult
  $Res call({
    List<Category> categories,
    Option<CategoryFailure> failureOptionCategory,
    bool hasReachedMax,
    int page,
    bool isLoadingMore,
    String? searchQuery,
  });
}

/// @nodoc
class __$$CategoryLoaderStateImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$CategoryLoaderStateImpl>
    implements _$$CategoryLoaderStateImplCopyWith<$Res> {
  __$$CategoryLoaderStateImplCopyWithImpl(
    _$CategoryLoaderStateImpl _value,
    $Res Function(_$CategoryLoaderStateImpl) _then,
  ) : super(_value, _then);

  /// Create a copy of CategoryLoaderState
  /// with the given fields replaced by the non-null parameter values.
  @pragma('vm:prefer-inline')
  @override
  $Res call({
    Object? categories = null,
    Object? failureOptionCategory = null,
    Object? hasReachedMax = null,
    Object? page = null,
    Object? isLoadingMore = null,
    Object? searchQuery = freezed,
  }) {
    return _then(
      _$CategoryLoaderStateImpl(
        categories: null == categories
            ? _value._categories
            : categories // ignore: cast_nullable_to_non_nullable
                  as List<Category>,
        failureOptionCategory: null == failureOptionCategory
            ? _value.failureOptionCategory
            : failureOptionCategory // ignore: cast_nullable_to_non_nullable
                  as Option<CategoryFailure>,
        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,
        isLoadingMore: null == isLoadingMore
            ? _value.isLoadingMore
            : isLoadingMore // ignore: cast_nullable_to_non_nullable
                  as bool,
        searchQuery: freezed == searchQuery
            ? _value.searchQuery
            : searchQuery // ignore: cast_nullable_to_non_nullable
                  as String?,
      ),
    );
  }
}

/// @nodoc

class _$CategoryLoaderStateImpl implements _CategoryLoaderState {
  _$CategoryLoaderStateImpl({
    required final List<Category> categories,
    required this.failureOptionCategory,
    this.hasReachedMax = false,
    this.page = 1,
    this.isLoadingMore = false,
    this.searchQuery,
  }) : _categories = categories;

  final List<Category> _categories;
  @override
  List<Category> get categories {
    if (_categories is EqualUnmodifiableListView) return _categories;
    // ignore: implicit_dynamic_type
    return EqualUnmodifiableListView(_categories);
  }

  @override
  final Option<CategoryFailure> failureOptionCategory;
  @override
  @JsonKey()
  final bool hasReachedMax;
  @override
  @JsonKey()
  final int page;
  @override
  @JsonKey()
  final bool isLoadingMore;
  @override
  final String? searchQuery;

  @override
  String toString() {
    return 'CategoryLoaderState(categories: $categories, failureOptionCategory: $failureOptionCategory, hasReachedMax: $hasReachedMax, page: $page, isLoadingMore: $isLoadingMore, searchQuery: $searchQuery)';
  }

  @override
  bool operator ==(Object other) {
    return identical(this, other) ||
        (other.runtimeType == runtimeType &&
            other is _$CategoryLoaderStateImpl &&
            const DeepCollectionEquality().equals(
              other._categories,
              _categories,
            ) &&
            (identical(other.failureOptionCategory, failureOptionCategory) ||
                other.failureOptionCategory == failureOptionCategory) &&
            (identical(other.hasReachedMax, hasReachedMax) ||
                other.hasReachedMax == hasReachedMax) &&
            (identical(other.page, page) || other.page == page) &&
            (identical(other.isLoadingMore, isLoadingMore) ||
                other.isLoadingMore == isLoadingMore) &&
            (identical(other.searchQuery, searchQuery) ||
                other.searchQuery == searchQuery));
  }

  @override
  int get hashCode => Object.hash(
    runtimeType,
    const DeepCollectionEquality().hash(_categories),
    failureOptionCategory,
    hasReachedMax,
    page,
    isLoadingMore,
    searchQuery,
  );

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

abstract class _CategoryLoaderState implements CategoryLoaderState {
  factory _CategoryLoaderState({
    required final List<Category> categories,
    required final Option<CategoryFailure> failureOptionCategory,
    final bool hasReachedMax,
    final int page,
    final bool isLoadingMore,
    final String? searchQuery,
  }) = _$CategoryLoaderStateImpl;

  @override
  List<Category> get categories;
  @override
  Option<CategoryFailure> get failureOptionCategory;
  @override
  bool get hasReachedMax;
  @override
  int get page;
  @override
  bool get isLoadingMore;
  @override
  String? get searchQuery;

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