// 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 {
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) =>
      throw _privateConstructorUsedError;
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) =>
      throw _privateConstructorUsedError;
}

/// @nodoc
abstract class $CategoryLoaderStateCopyWith<$Res> {
  factory $CategoryLoaderStateCopyWith(
          CategoryLoaderState value, $Res Function(CategoryLoaderState) then) =
      _$CategoryLoaderStateCopyWithImpl<$Res, CategoryLoaderState>;
}

/// @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.
}

/// @nodoc
abstract class _$$InitialImplCopyWith<$Res> {
  factory _$$InitialImplCopyWith(
          _$InitialImpl value, $Res Function(_$InitialImpl) then) =
      __$$InitialImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$InitialImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$InitialImpl>
    implements _$$InitialImplCopyWith<$Res> {
  __$$InitialImplCopyWithImpl(
      _$InitialImpl _value, $Res Function(_$InitialImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$InitialImpl implements _Initial {
  const _$InitialImpl();

  @override
  String toString() {
    return 'CategoryLoaderState.initial()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return initial();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return initial?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return initial(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return initial?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (initial != null) {
      return initial(this);
    }
    return orElse();
  }
}

abstract class _Initial implements CategoryLoaderState {
  const factory _Initial() = _$InitialImpl;
}

/// @nodoc
abstract class _$$LoadingImplCopyWith<$Res> {
  factory _$$LoadingImplCopyWith(
          _$LoadingImpl value, $Res Function(_$LoadingImpl) then) =
      __$$LoadingImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$LoadingImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$LoadingImpl>
    implements _$$LoadingImplCopyWith<$Res> {
  __$$LoadingImplCopyWithImpl(
      _$LoadingImpl _value, $Res Function(_$LoadingImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$LoadingImpl implements _Loading {
  const _$LoadingImpl();

  @override
  String toString() {
    return 'CategoryLoaderState.loading()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return loading();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return loading?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return loading(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return loading?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (loading != null) {
      return loading(this);
    }
    return orElse();
  }
}

abstract class _Loading implements CategoryLoaderState {
  const factory _Loading() = _$LoadingImpl;
}

/// @nodoc
abstract class _$$LoadedImplCopyWith<$Res> {
  factory _$$LoadedImplCopyWith(
          _$LoadedImpl value, $Res Function(_$LoadedImpl) then) =
      __$$LoadedImplCopyWithImpl<$Res>;
  @useResult
  $Res call(
      {List<CategoryModel> categories,
      bool hasReachedMax,
      int currentPage,
      bool isLoadingMore,
      bool isActive,
      String? searchQuery});
}

/// @nodoc
class __$$LoadedImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$LoadedImpl>
    implements _$$LoadedImplCopyWith<$Res> {
  __$$LoadedImplCopyWithImpl(
      _$LoadedImpl _value, $Res Function(_$LoadedImpl) _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? hasReachedMax = null,
    Object? currentPage = null,
    Object? isLoadingMore = null,
    Object? isActive = null,
    Object? searchQuery = freezed,
  }) {
    return _then(_$LoadedImpl(
      categories: null == categories
          ? _value._categories
          : categories // ignore: cast_nullable_to_non_nullable
              as List<CategoryModel>,
      hasReachedMax: null == hasReachedMax
          ? _value.hasReachedMax
          : hasReachedMax // ignore: cast_nullable_to_non_nullable
              as bool,
      currentPage: null == currentPage
          ? _value.currentPage
          : currentPage // ignore: cast_nullable_to_non_nullable
              as int,
      isLoadingMore: null == isLoadingMore
          ? _value.isLoadingMore
          : isLoadingMore // ignore: cast_nullable_to_non_nullable
              as bool,
      isActive: null == isActive
          ? _value.isActive
          : isActive // ignore: cast_nullable_to_non_nullable
              as bool,
      searchQuery: freezed == searchQuery
          ? _value.searchQuery
          : searchQuery // ignore: cast_nullable_to_non_nullable
              as String?,
    ));
  }
}

/// @nodoc

class _$LoadedImpl implements _Loaded {
  const _$LoadedImpl(
      {required final List<CategoryModel> categories,
      required this.hasReachedMax,
      required this.currentPage,
      required this.isLoadingMore,
      required this.isActive,
      this.searchQuery})
      : _categories = categories;

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

  @override
  final bool hasReachedMax;
  @override
  final int currentPage;
  @override
  final bool isLoadingMore;
  @override
  final bool isActive;
  @override
  final String? searchQuery;

  @override
  String toString() {
    return 'CategoryLoaderState.loaded(categories: $categories, hasReachedMax: $hasReachedMax, currentPage: $currentPage, isLoadingMore: $isLoadingMore, isActive: $isActive, searchQuery: $searchQuery)';
  }

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

  @override
  int get hashCode => Object.hash(
      runtimeType,
      const DeepCollectionEquality().hash(_categories),
      hasReachedMax,
      currentPage,
      isLoadingMore,
      isActive,
      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')
  _$$LoadedImplCopyWith<_$LoadedImpl> get copyWith =>
      __$$LoadedImplCopyWithImpl<_$LoadedImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return loaded(categories, hasReachedMax, currentPage, isLoadingMore,
        isActive, searchQuery);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return loaded?.call(categories, hasReachedMax, currentPage, isLoadingMore,
        isActive, searchQuery);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (loaded != null) {
      return loaded(categories, hasReachedMax, currentPage, isLoadingMore,
          isActive, searchQuery);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return loaded(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return loaded?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (loaded != null) {
      return loaded(this);
    }
    return orElse();
  }
}

abstract class _Loaded implements CategoryLoaderState {
  const factory _Loaded(
      {required final List<CategoryModel> categories,
      required final bool hasReachedMax,
      required final int currentPage,
      required final bool isLoadingMore,
      required final bool isActive,
      final String? searchQuery}) = _$LoadedImpl;

  List<CategoryModel> get categories;
  bool get hasReachedMax;
  int get currentPage;
  bool get isLoadingMore;
  bool get isActive;
  String? get searchQuery;

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

/// @nodoc
abstract class _$$ErrorImplCopyWith<$Res> {
  factory _$$ErrorImplCopyWith(
          _$ErrorImpl value, $Res Function(_$ErrorImpl) then) =
      __$$ErrorImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String message});
}

/// @nodoc
class __$$ErrorImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$ErrorImpl>
    implements _$$ErrorImplCopyWith<$Res> {
  __$$ErrorImplCopyWithImpl(
      _$ErrorImpl _value, $Res Function(_$ErrorImpl) _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? message = null,
  }) {
    return _then(_$ErrorImpl(
      null == message
          ? _value.message
          : message // ignore: cast_nullable_to_non_nullable
              as String,
    ));
  }
}

/// @nodoc

class _$ErrorImpl implements _Error {
  const _$ErrorImpl(this.message);

  @override
  final String message;

  @override
  String toString() {
    return 'CategoryLoaderState.error(message: $message)';
  }

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

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

  /// 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')
  _$$ErrorImplCopyWith<_$ErrorImpl> get copyWith =>
      __$$ErrorImplCopyWithImpl<_$ErrorImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return error(message);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return error?.call(message);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (error != null) {
      return error(message);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return error(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return error?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (error != null) {
      return error(this);
    }
    return orElse();
  }
}

abstract class _Error implements CategoryLoaderState {
  const factory _Error(final String message) = _$ErrorImpl;

  String get message;

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

/// @nodoc
abstract class _$$SyncingImplCopyWith<$Res> {
  factory _$$SyncingImplCopyWith(
          _$SyncingImpl value, $Res Function(_$SyncingImpl) then) =
      __$$SyncingImplCopyWithImpl<$Res>;
}

/// @nodoc
class __$$SyncingImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$SyncingImpl>
    implements _$$SyncingImplCopyWith<$Res> {
  __$$SyncingImplCopyWithImpl(
      _$SyncingImpl _value, $Res Function(_$SyncingImpl) _then)
      : super(_value, _then);

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

/// @nodoc

class _$SyncingImpl implements _Syncing {
  const _$SyncingImpl();

  @override
  String toString() {
    return 'CategoryLoaderState.syncing()';
  }

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

  @override
  int get hashCode => runtimeType.hashCode;

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return syncing();
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return syncing?.call();
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncing != null) {
      return syncing();
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return syncing(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return syncing?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncing != null) {
      return syncing(this);
    }
    return orElse();
  }
}

abstract class _Syncing implements CategoryLoaderState {
  const factory _Syncing() = _$SyncingImpl;
}

/// @nodoc
abstract class _$$SyncSuccessImplCopyWith<$Res> {
  factory _$$SyncSuccessImplCopyWith(
          _$SyncSuccessImpl value, $Res Function(_$SyncSuccessImpl) then) =
      __$$SyncSuccessImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String message});
}

/// @nodoc
class __$$SyncSuccessImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$SyncSuccessImpl>
    implements _$$SyncSuccessImplCopyWith<$Res> {
  __$$SyncSuccessImplCopyWithImpl(
      _$SyncSuccessImpl _value, $Res Function(_$SyncSuccessImpl) _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? message = null,
  }) {
    return _then(_$SyncSuccessImpl(
      null == message
          ? _value.message
          : message // ignore: cast_nullable_to_non_nullable
              as String,
    ));
  }
}

/// @nodoc

class _$SyncSuccessImpl implements _SyncSuccess {
  const _$SyncSuccessImpl(this.message);

  @override
  final String message;

  @override
  String toString() {
    return 'CategoryLoaderState.syncSuccess(message: $message)';
  }

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

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

  /// 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')
  _$$SyncSuccessImplCopyWith<_$SyncSuccessImpl> get copyWith =>
      __$$SyncSuccessImplCopyWithImpl<_$SyncSuccessImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return syncSuccess(message);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return syncSuccess?.call(message);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncSuccess != null) {
      return syncSuccess(message);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return syncSuccess(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return syncSuccess?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncSuccess != null) {
      return syncSuccess(this);
    }
    return orElse();
  }
}

abstract class _SyncSuccess implements CategoryLoaderState {
  const factory _SyncSuccess(final String message) = _$SyncSuccessImpl;

  String get message;

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

/// @nodoc
abstract class _$$SyncErrorImplCopyWith<$Res> {
  factory _$$SyncErrorImplCopyWith(
          _$SyncErrorImpl value, $Res Function(_$SyncErrorImpl) then) =
      __$$SyncErrorImplCopyWithImpl<$Res>;
  @useResult
  $Res call({String message});
}

/// @nodoc
class __$$SyncErrorImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$SyncErrorImpl>
    implements _$$SyncErrorImplCopyWith<$Res> {
  __$$SyncErrorImplCopyWithImpl(
      _$SyncErrorImpl _value, $Res Function(_$SyncErrorImpl) _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? message = null,
  }) {
    return _then(_$SyncErrorImpl(
      null == message
          ? _value.message
          : message // ignore: cast_nullable_to_non_nullable
              as String,
    ));
  }
}

/// @nodoc

class _$SyncErrorImpl implements _SyncError {
  const _$SyncErrorImpl(this.message);

  @override
  final String message;

  @override
  String toString() {
    return 'CategoryLoaderState.syncError(message: $message)';
  }

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

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

  /// 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')
  _$$SyncErrorImplCopyWith<_$SyncErrorImpl> get copyWith =>
      __$$SyncErrorImplCopyWithImpl<_$SyncErrorImpl>(this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return syncError(message);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return syncError?.call(message);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncError != null) {
      return syncError(message);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return syncError(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return syncError?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (syncError != null) {
      return syncError(this);
    }
    return orElse();
  }
}

abstract class _SyncError implements CategoryLoaderState {
  const factory _SyncError(final String message) = _$SyncErrorImpl;

  String get message;

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

/// @nodoc
abstract class _$$AllCategoriesLoadedImplCopyWith<$Res> {
  factory _$$AllCategoriesLoadedImplCopyWith(_$AllCategoriesLoadedImpl value,
          $Res Function(_$AllCategoriesLoadedImpl) then) =
      __$$AllCategoriesLoadedImplCopyWithImpl<$Res>;
  @useResult
  $Res call({List<CategoryModel> categories});
}

/// @nodoc
class __$$AllCategoriesLoadedImplCopyWithImpl<$Res>
    extends _$CategoryLoaderStateCopyWithImpl<$Res, _$AllCategoriesLoadedImpl>
    implements _$$AllCategoriesLoadedImplCopyWith<$Res> {
  __$$AllCategoriesLoadedImplCopyWithImpl(_$AllCategoriesLoadedImpl _value,
      $Res Function(_$AllCategoriesLoadedImpl) _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,
  }) {
    return _then(_$AllCategoriesLoadedImpl(
      null == categories
          ? _value._categories
          : categories // ignore: cast_nullable_to_non_nullable
              as List<CategoryModel>,
    ));
  }
}

/// @nodoc

class _$AllCategoriesLoadedImpl implements _AllCategoriesLoaded {
  const _$AllCategoriesLoadedImpl(final List<CategoryModel> categories)
      : _categories = categories;

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

  @override
  String toString() {
    return 'CategoryLoaderState.allCategoriesLoaded(categories: $categories)';
  }

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

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

  /// 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')
  _$$AllCategoriesLoadedImplCopyWith<_$AllCategoriesLoadedImpl> get copyWith =>
      __$$AllCategoriesLoadedImplCopyWithImpl<_$AllCategoriesLoadedImpl>(
          this, _$identity);

  @override
  @optionalTypeArgs
  TResult when<TResult extends Object?>({
    required TResult Function() initial,
    required TResult Function() loading,
    required TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)
        loaded,
    required TResult Function(String message) error,
    required TResult Function() syncing,
    required TResult Function(String message) syncSuccess,
    required TResult Function(String message) syncError,
    required TResult Function(List<CategoryModel> categories)
        allCategoriesLoaded,
  }) {
    return allCategoriesLoaded(categories);
  }

  @override
  @optionalTypeArgs
  TResult? whenOrNull<TResult extends Object?>({
    TResult? Function()? initial,
    TResult? Function()? loading,
    TResult? Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult? Function(String message)? error,
    TResult? Function()? syncing,
    TResult? Function(String message)? syncSuccess,
    TResult? Function(String message)? syncError,
    TResult? Function(List<CategoryModel> categories)? allCategoriesLoaded,
  }) {
    return allCategoriesLoaded?.call(categories);
  }

  @override
  @optionalTypeArgs
  TResult maybeWhen<TResult extends Object?>({
    TResult Function()? initial,
    TResult Function()? loading,
    TResult Function(
            List<CategoryModel> categories,
            bool hasReachedMax,
            int currentPage,
            bool isLoadingMore,
            bool isActive,
            String? searchQuery)?
        loaded,
    TResult Function(String message)? error,
    TResult Function()? syncing,
    TResult Function(String message)? syncSuccess,
    TResult Function(String message)? syncError,
    TResult Function(List<CategoryModel> categories)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (allCategoriesLoaded != null) {
      return allCategoriesLoaded(categories);
    }
    return orElse();
  }

  @override
  @optionalTypeArgs
  TResult map<TResult extends Object?>({
    required TResult Function(_Initial value) initial,
    required TResult Function(_Loading value) loading,
    required TResult Function(_Loaded value) loaded,
    required TResult Function(_Error value) error,
    required TResult Function(_Syncing value) syncing,
    required TResult Function(_SyncSuccess value) syncSuccess,
    required TResult Function(_SyncError value) syncError,
    required TResult Function(_AllCategoriesLoaded value) allCategoriesLoaded,
  }) {
    return allCategoriesLoaded(this);
  }

  @override
  @optionalTypeArgs
  TResult? mapOrNull<TResult extends Object?>({
    TResult? Function(_Initial value)? initial,
    TResult? Function(_Loading value)? loading,
    TResult? Function(_Loaded value)? loaded,
    TResult? Function(_Error value)? error,
    TResult? Function(_Syncing value)? syncing,
    TResult? Function(_SyncSuccess value)? syncSuccess,
    TResult? Function(_SyncError value)? syncError,
    TResult? Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
  }) {
    return allCategoriesLoaded?.call(this);
  }

  @override
  @optionalTypeArgs
  TResult maybeMap<TResult extends Object?>({
    TResult Function(_Initial value)? initial,
    TResult Function(_Loading value)? loading,
    TResult Function(_Loaded value)? loaded,
    TResult Function(_Error value)? error,
    TResult Function(_Syncing value)? syncing,
    TResult Function(_SyncSuccess value)? syncSuccess,
    TResult Function(_SyncError value)? syncError,
    TResult Function(_AllCategoriesLoaded value)? allCategoriesLoaded,
    required TResult orElse(),
  }) {
    if (allCategoriesLoaded != null) {
      return allCategoriesLoaded(this);
    }
    return orElse();
  }
}

abstract class _AllCategoriesLoaded implements CategoryLoaderState {
  const factory _AllCategoriesLoaded(final List<CategoryModel> categories) =
      _$AllCategoriesLoadedImpl;

  List<CategoryModel> get categories;

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