// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'favorites_provider.dart';

// **************************************************************************
// RiverpodGenerator
// **************************************************************************

// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Provides instance of FavoritesRemoteDataSource

@ProviderFor(favoritesRemoteDataSource)
const favoritesRemoteDataSourceProvider = FavoritesRemoteDataSourceProvider._();

/// Provides instance of FavoritesRemoteDataSource

final class FavoritesRemoteDataSourceProvider
    extends
        $FunctionalProvider<
          AsyncValue<FavoritesRemoteDataSource>,
          FavoritesRemoteDataSource,
          FutureOr<FavoritesRemoteDataSource>
        >
    with
        $FutureModifier<FavoritesRemoteDataSource>,
        $FutureProvider<FavoritesRemoteDataSource> {
  /// Provides instance of FavoritesRemoteDataSource
  const FavoritesRemoteDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoritesRemoteDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoritesRemoteDataSourceHash();

  @$internal
  @override
  $FutureProviderElement<FavoritesRemoteDataSource> $createElement(
    $ProviderPointer pointer,
  ) => $FutureProviderElement(pointer);

  @override
  FutureOr<FavoritesRemoteDataSource> create(Ref ref) {
    return favoritesRemoteDataSource(ref);
  }
}

String _$favoritesRemoteDataSourceHash() =>
    r'ec129162e49f37512950106516c0be6cbe1dfceb';

/// Provides instance of FavoriteProductsLocalDataSource

@ProviderFor(favoriteProductsLocalDataSource)
const favoriteProductsLocalDataSourceProvider =
    FavoriteProductsLocalDataSourceProvider._();

/// Provides instance of FavoriteProductsLocalDataSource

final class FavoriteProductsLocalDataSourceProvider
    extends
        $FunctionalProvider<
          FavoriteProductsLocalDataSource,
          FavoriteProductsLocalDataSource,
          FavoriteProductsLocalDataSource
        >
    with $Provider<FavoriteProductsLocalDataSource> {
  /// Provides instance of FavoriteProductsLocalDataSource
  const FavoriteProductsLocalDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoriteProductsLocalDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoriteProductsLocalDataSourceHash();

  @$internal
  @override
  $ProviderElement<FavoriteProductsLocalDataSource> $createElement(
    $ProviderPointer pointer,
  ) => $ProviderElement(pointer);

  @override
  FavoriteProductsLocalDataSource create(Ref ref) {
    return favoriteProductsLocalDataSource(ref);
  }

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(FavoriteProductsLocalDataSource value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<FavoriteProductsLocalDataSource>(
        value,
      ),
    );
  }
}

String _$favoriteProductsLocalDataSourceHash() =>
    r'852ae8132f466b3fa6549c26880821ea31e00092';

/// Provides instance of FavoritesRepository with online-first approach

@ProviderFor(favoritesRepository)
const favoritesRepositoryProvider = FavoritesRepositoryProvider._();

/// Provides instance of FavoritesRepository with online-first approach

final class FavoritesRepositoryProvider
    extends
        $FunctionalProvider<
          AsyncValue<FavoritesRepository>,
          FavoritesRepository,
          FutureOr<FavoritesRepository>
        >
    with
        $FutureModifier<FavoritesRepository>,
        $FutureProvider<FavoritesRepository> {
  /// Provides instance of FavoritesRepository with online-first approach
  const FavoritesRepositoryProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoritesRepositoryProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoritesRepositoryHash();

  @$internal
  @override
  $FutureProviderElement<FavoritesRepository> $createElement(
    $ProviderPointer pointer,
  ) => $FutureProviderElement(pointer);

  @override
  FutureOr<FavoritesRepository> create(Ref ref) {
    return favoritesRepository(ref);
  }
}

String _$favoritesRepositoryHash() =>
    r'1856b5972aaf9d243f8e5450973ea3ab4aead3f6';

/// Manages favorite products with full Product data from wishlist API
///
/// This is the MAIN provider for the favorites feature.
/// Returns full Product objects with all data from the wishlist API.
///
/// Online-first: Fetches from API, caches locally
/// Offline: Returns cached products
///
/// Uses keepAlive to prevent unnecessary reloads.
/// Provides refresh() method for pull-to-refresh functionality.
///
/// AsyncNotifier pattern allows:
/// - Manual refresh capability
/// - Proper loading states during operations
/// - State updates after mutations
/// - Better error handling

@ProviderFor(FavoriteProducts)
const favoriteProductsProvider = FavoriteProductsProvider._();

/// Manages favorite products with full Product data from wishlist API
///
/// This is the MAIN provider for the favorites feature.
/// Returns full Product objects with all data from the wishlist API.
///
/// Online-first: Fetches from API, caches locally
/// Offline: Returns cached products
///
/// Uses keepAlive to prevent unnecessary reloads.
/// Provides refresh() method for pull-to-refresh functionality.
///
/// AsyncNotifier pattern allows:
/// - Manual refresh capability
/// - Proper loading states during operations
/// - State updates after mutations
/// - Better error handling
final class FavoriteProductsProvider
    extends $AsyncNotifierProvider<FavoriteProducts, List<Product>> {
  /// Manages favorite products with full Product data from wishlist API
  ///
  /// This is the MAIN provider for the favorites feature.
  /// Returns full Product objects with all data from the wishlist API.
  ///
  /// Online-first: Fetches from API, caches locally
  /// Offline: Returns cached products
  ///
  /// Uses keepAlive to prevent unnecessary reloads.
  /// Provides refresh() method for pull-to-refresh functionality.
  ///
  /// AsyncNotifier pattern allows:
  /// - Manual refresh capability
  /// - Proper loading states during operations
  /// - State updates after mutations
  /// - Better error handling
  const FavoriteProductsProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoriteProductsProvider',
        isAutoDispose: false,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoriteProductsHash();

  @$internal
  @override
  FavoriteProducts create() => FavoriteProducts();
}

String _$favoriteProductsHash() => r'6d042f469a1f71bb06f8b5b76014bf24e30e6758';

/// Manages favorite products with full Product data from wishlist API
///
/// This is the MAIN provider for the favorites feature.
/// Returns full Product objects with all data from the wishlist API.
///
/// Online-first: Fetches from API, caches locally
/// Offline: Returns cached products
///
/// Uses keepAlive to prevent unnecessary reloads.
/// Provides refresh() method for pull-to-refresh functionality.
///
/// AsyncNotifier pattern allows:
/// - Manual refresh capability
/// - Proper loading states during operations
/// - State updates after mutations
/// - Better error handling

abstract class _$FavoriteProducts extends $AsyncNotifier<List<Product>> {
  FutureOr<List<Product>> build();
  @$mustCallSuper
  @override
  void runBuild() {
    final created = build();
    final ref = this.ref as $Ref<AsyncValue<List<Product>>, List<Product>>;
    final element =
        ref.element
            as $ClassProviderElement<
              AnyNotifier<AsyncValue<List<Product>>, List<Product>>,
              AsyncValue<List<Product>>,
              Object?,
              Object?
            >;
    element.handleValue(ref, created);
  }
}

/// Check if a specific product is favorited (LOCAL ONLY - no API call)
///
/// Reads directly from Hive local cache for instant response.
/// This is used in product detail page to avoid unnecessary API calls.
/// The cache is synced when favorites are loaded or modified.

@ProviderFor(isFavorite)
const isFavoriteProvider = IsFavoriteFamily._();

/// Check if a specific product is favorited (LOCAL ONLY - no API call)
///
/// Reads directly from Hive local cache for instant response.
/// This is used in product detail page to avoid unnecessary API calls.
/// The cache is synced when favorites are loaded or modified.

final class IsFavoriteProvider extends $FunctionalProvider<bool, bool, bool>
    with $Provider<bool> {
  /// Check if a specific product is favorited (LOCAL ONLY - no API call)
  ///
  /// Reads directly from Hive local cache for instant response.
  /// This is used in product detail page to avoid unnecessary API calls.
  /// The cache is synced when favorites are loaded or modified.
  const IsFavoriteProvider._({
    required IsFavoriteFamily super.from,
    required String super.argument,
  }) : super(
         retry: null,
         name: r'isFavoriteProvider',
         isAutoDispose: true,
         dependencies: null,
         $allTransitiveDependencies: null,
       );

  @override
  String debugGetCreateSourceHash() => _$isFavoriteHash();

  @override
  String toString() {
    return r'isFavoriteProvider'
        ''
        '($argument)';
  }

  @$internal
  @override
  $ProviderElement<bool> $createElement($ProviderPointer pointer) =>
      $ProviderElement(pointer);

  @override
  bool create(Ref ref) {
    final argument = this.argument as String;
    return isFavorite(ref, argument);
  }

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(bool value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<bool>(value),
    );
  }

  @override
  bool operator ==(Object other) {
    return other is IsFavoriteProvider && other.argument == argument;
  }

  @override
  int get hashCode {
    return argument.hashCode;
  }
}

String _$isFavoriteHash() => r'7aa2377f37ceb2c450c9e29b5c134ba160e4ecc2';

/// Check if a specific product is favorited (LOCAL ONLY - no API call)
///
/// Reads directly from Hive local cache for instant response.
/// This is used in product detail page to avoid unnecessary API calls.
/// The cache is synced when favorites are loaded or modified.

final class IsFavoriteFamily extends $Family
    with $FunctionalFamilyOverride<bool, String> {
  const IsFavoriteFamily._()
    : super(
        retry: null,
        name: r'isFavoriteProvider',
        dependencies: null,
        $allTransitiveDependencies: null,
        isAutoDispose: true,
      );

  /// Check if a specific product is favorited (LOCAL ONLY - no API call)
  ///
  /// Reads directly from Hive local cache for instant response.
  /// This is used in product detail page to avoid unnecessary API calls.
  /// The cache is synced when favorites are loaded or modified.

  IsFavoriteProvider call(String productId) =>
      IsFavoriteProvider._(argument: productId, from: this);

  @override
  String toString() => r'isFavoriteProvider';
}

/// Local favorite IDs provider (synced with Hive)
///
/// This provider watches Hive changes and provides a Set of favorite product IDs.
/// Used to trigger rebuilds when favorites are added/removed.

@ProviderFor(FavoriteIdsLocal)
const favoriteIdsLocalProvider = FavoriteIdsLocalProvider._();

/// Local favorite IDs provider (synced with Hive)
///
/// This provider watches Hive changes and provides a Set of favorite product IDs.
/// Used to trigger rebuilds when favorites are added/removed.
final class FavoriteIdsLocalProvider
    extends $NotifierProvider<FavoriteIdsLocal, Set<String>> {
  /// Local favorite IDs provider (synced with Hive)
  ///
  /// This provider watches Hive changes and provides a Set of favorite product IDs.
  /// Used to trigger rebuilds when favorites are added/removed.
  const FavoriteIdsLocalProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoriteIdsLocalProvider',
        isAutoDispose: false,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoriteIdsLocalHash();

  @$internal
  @override
  FavoriteIdsLocal create() => FavoriteIdsLocal();

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(Set<String> value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<Set<String>>(value),
    );
  }
}

String _$favoriteIdsLocalHash() => r'db248bc6dcd8ba39d8c3e410188cac67ebf96140';

/// Local favorite IDs provider (synced with Hive)
///
/// This provider watches Hive changes and provides a Set of favorite product IDs.
/// Used to trigger rebuilds when favorites are added/removed.

abstract class _$FavoriteIdsLocal extends $Notifier<Set<String>> {
  Set<String> build();
  @$mustCallSuper
  @override
  void runBuild() {
    final created = build();
    final ref = this.ref as $Ref<Set<String>, Set<String>>;
    final element =
        ref.element
            as $ClassProviderElement<
              AnyNotifier<Set<String>, Set<String>>,
              Set<String>,
              Object?,
              Object?
            >;
    element.handleValue(ref, created);
  }
}

/// Get the total count of favorites
///
/// Derived from the favorite products list.
/// Returns the number of products in the user's favorites.
/// Safe to use in build methods - will return 0 during loading/error states.

@ProviderFor(favoriteCount)
const favoriteCountProvider = FavoriteCountProvider._();

/// Get the total count of favorites
///
/// Derived from the favorite products list.
/// Returns the number of products in the user's favorites.
/// Safe to use in build methods - will return 0 during loading/error states.

final class FavoriteCountProvider extends $FunctionalProvider<int, int, int>
    with $Provider<int> {
  /// Get the total count of favorites
  ///
  /// Derived from the favorite products list.
  /// Returns the number of products in the user's favorites.
  /// Safe to use in build methods - will return 0 during loading/error states.
  const FavoriteCountProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoriteCountProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoriteCountHash();

  @$internal
  @override
  $ProviderElement<int> $createElement($ProviderPointer pointer) =>
      $ProviderElement(pointer);

  @override
  int create(Ref ref) {
    return favoriteCount(ref);
  }

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(int value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<int>(value),
    );
  }
}

String _$favoriteCountHash() => r'f6f9ab69653671dbc6085dc75b2cae35a47c31a5';

/// Get all favorite product IDs as a list
///
/// Derived from the favorite products list.
/// Useful for filtering product lists or bulk operations.
/// Returns an empty list during loading/error states.

@ProviderFor(favoriteProductIds)
const favoriteProductIdsProvider = FavoriteProductIdsProvider._();

/// Get all favorite product IDs as a list
///
/// Derived from the favorite products list.
/// Useful for filtering product lists or bulk operations.
/// Returns an empty list during loading/error states.

final class FavoriteProductIdsProvider
    extends $FunctionalProvider<List<String>, List<String>, List<String>>
    with $Provider<List<String>> {
  /// Get all favorite product IDs as a list
  ///
  /// Derived from the favorite products list.
  /// Useful for filtering product lists or bulk operations.
  /// Returns an empty list during loading/error states.
  const FavoriteProductIdsProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'favoriteProductIdsProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

  @override
  String debugGetCreateSourceHash() => _$favoriteProductIdsHash();

  @$internal
  @override
  $ProviderElement<List<String>> $createElement($ProviderPointer pointer) =>
      $ProviderElement(pointer);

  @override
  List<String> create(Ref ref) {
    return favoriteProductIds(ref);
  }

  /// {@macro riverpod.override_with_value}
  Override overrideWithValue(List<String> value) {
    return $ProviderOverride(
      origin: this,
      providerOverride: $SyncValueProvider<List<String>>(value),
    );
  }
}

String _$favoriteProductIdsHash() =>
    r'2e281e9a5dee122d326354afd515a68c7f0c4137';
