// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'news_provider.dart';

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

// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// News Local DataSource Provider
///
/// Provides instance of NewsLocalDataSource.

@ProviderFor(newsLocalDataSource)
const newsLocalDataSourceProvider = NewsLocalDataSourceProvider._();

/// News Local DataSource Provider
///
/// Provides instance of NewsLocalDataSource.

final class NewsLocalDataSourceProvider
    extends
        $FunctionalProvider<
          NewsLocalDataSource,
          NewsLocalDataSource,
          NewsLocalDataSource
        >
    with $Provider<NewsLocalDataSource> {
  /// News Local DataSource Provider
  ///
  /// Provides instance of NewsLocalDataSource.
  const NewsLocalDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'newsLocalDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  NewsLocalDataSource create(Ref ref) {
    return newsLocalDataSource(ref);
  }

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

String _$newsLocalDataSourceHash() =>
    r'e7e7d71d20274fe8b498c7b15f8aeb9eb515af27';

/// News Remote DataSource Provider
///
/// Provides instance of NewsRemoteDataSource with Frappe auth service.

@ProviderFor(newsRemoteDataSource)
const newsRemoteDataSourceProvider = NewsRemoteDataSourceProvider._();

/// News Remote DataSource Provider
///
/// Provides instance of NewsRemoteDataSource with Frappe auth service.

final class NewsRemoteDataSourceProvider
    extends
        $FunctionalProvider<
          AsyncValue<NewsRemoteDataSource>,
          NewsRemoteDataSource,
          FutureOr<NewsRemoteDataSource>
        >
    with
        $FutureModifier<NewsRemoteDataSource>,
        $FutureProvider<NewsRemoteDataSource> {
  /// News Remote DataSource Provider
  ///
  /// Provides instance of NewsRemoteDataSource with Frappe auth service.
  const NewsRemoteDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'newsRemoteDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<NewsRemoteDataSource> create(Ref ref) {
    return newsRemoteDataSource(ref);
  }
}

String _$newsRemoteDataSourceHash() =>
    r'27db8dc4fadf806349fe4f0ad5fed1999620c1a3';

/// News Repository Provider
///
/// Provides instance of NewsRepository implementation.

@ProviderFor(newsRepository)
const newsRepositoryProvider = NewsRepositoryProvider._();

/// News Repository Provider
///
/// Provides instance of NewsRepository implementation.

final class NewsRepositoryProvider
    extends
        $FunctionalProvider<
          AsyncValue<NewsRepository>,
          NewsRepository,
          FutureOr<NewsRepository>
        >
    with $FutureModifier<NewsRepository>, $FutureProvider<NewsRepository> {
  /// News Repository Provider
  ///
  /// Provides instance of NewsRepository implementation.
  const NewsRepositoryProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'newsRepositoryProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<NewsRepository> create(Ref ref) {
    return newsRepository(ref);
  }
}

String _$newsRepositoryHash() => r'8e66d847014926ad542e402874e52d35b00cdbcc';

/// All News Articles Provider (Internal)
///
/// Fetches ALL blog posts from Frappe API sorted by published date (latest first).
/// This is the complete list used by both featured and latest articles providers.
/// Do not use this provider directly in UI - use featuredArticle or newsArticles instead.

@ProviderFor(_allNewsArticles)
const _allNewsArticlesProvider = _AllNewsArticlesProvider._();

/// All News Articles Provider (Internal)
///
/// Fetches ALL blog posts from Frappe API sorted by published date (latest first).
/// This is the complete list used by both featured and latest articles providers.
/// Do not use this provider directly in UI - use featuredArticle or newsArticles instead.

final class _AllNewsArticlesProvider
    extends
        $FunctionalProvider<
          AsyncValue<List<NewsArticle>>,
          List<NewsArticle>,
          FutureOr<List<NewsArticle>>
        >
    with
        $FutureModifier<List<NewsArticle>>,
        $FutureProvider<List<NewsArticle>> {
  /// All News Articles Provider (Internal)
  ///
  /// Fetches ALL blog posts from Frappe API sorted by published date (latest first).
  /// This is the complete list used by both featured and latest articles providers.
  /// Do not use this provider directly in UI - use featuredArticle or newsArticles instead.
  const _AllNewsArticlesProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'_allNewsArticlesProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<List<NewsArticle>> create(Ref ref) {
    return _allNewsArticles(ref);
  }
}

String _$_allNewsArticlesHash() => r'9ee5c1449f1a72710e801a6b4a9e5c72df842e61';

/// Featured Article Provider
///
/// Returns the first article from the complete list.
/// This is the latest published article that will be displayed prominently at the top.

@ProviderFor(featuredArticle)
const featuredArticleProvider = FeaturedArticleProvider._();

/// Featured Article Provider
///
/// Returns the first article from the complete list.
/// This is the latest published article that will be displayed prominently at the top.

final class FeaturedArticleProvider
    extends
        $FunctionalProvider<
          AsyncValue<NewsArticle?>,
          NewsArticle?,
          FutureOr<NewsArticle?>
        >
    with $FutureModifier<NewsArticle?>, $FutureProvider<NewsArticle?> {
  /// Featured Article Provider
  ///
  /// Returns the first article from the complete list.
  /// This is the latest published article that will be displayed prominently at the top.
  const FeaturedArticleProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'featuredArticleProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<NewsArticle?> create(Ref ref) {
    return featuredArticle(ref);
  }
}

String _$featuredArticleHash() => r'046567d4385aca2abe10767a98744c2c1cfafd78';

/// News Articles Provider
///
/// Returns latest news articles EXCLUDING the first item (which is shown as featured).
/// This ensures each article only appears once on the page.
/// Returns AsyncValue<List<NewsArticle>> for proper loading/error handling.

@ProviderFor(newsArticles)
const newsArticlesProvider = NewsArticlesProvider._();

/// News Articles Provider
///
/// Returns latest news articles EXCLUDING the first item (which is shown as featured).
/// This ensures each article only appears once on the page.
/// Returns AsyncValue<List<NewsArticle>> for proper loading/error handling.

final class NewsArticlesProvider
    extends
        $FunctionalProvider<
          AsyncValue<List<NewsArticle>>,
          List<NewsArticle>,
          FutureOr<List<NewsArticle>>
        >
    with
        $FutureModifier<List<NewsArticle>>,
        $FutureProvider<List<NewsArticle>> {
  /// News Articles Provider
  ///
  /// Returns latest news articles EXCLUDING the first item (which is shown as featured).
  /// This ensures each article only appears once on the page.
  /// Returns AsyncValue<List<NewsArticle>> for proper loading/error handling.
  const NewsArticlesProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'newsArticlesProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<List<NewsArticle>> create(Ref ref) {
    return newsArticles(ref);
  }
}

String _$newsArticlesHash() => r'954f28885540368a095a3423f4f64c0f1ff0f47d';

/// Selected News Category Provider (Legacy - using enum)
///
/// Manages the currently selected category filter.
/// null means "All" is selected (show all categories).

@ProviderFor(SelectedNewsCategory)
const selectedNewsCategoryProvider = SelectedNewsCategoryProvider._();

/// Selected News Category Provider (Legacy - using enum)
///
/// Manages the currently selected category filter.
/// null means "All" is selected (show all categories).
final class SelectedNewsCategoryProvider
    extends $NotifierProvider<SelectedNewsCategory, NewsCategory?> {
  /// Selected News Category Provider (Legacy - using enum)
  ///
  /// Manages the currently selected category filter.
  /// null means "All" is selected (show all categories).
  const SelectedNewsCategoryProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'selectedNewsCategoryProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

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

String _$selectedNewsCategoryHash() =>
    r'f1dca9a5d7de94cac90494d94ce05b727e6e4d5f';

/// Selected News Category Provider (Legacy - using enum)
///
/// Manages the currently selected category filter.
/// null means "All" is selected (show all categories).

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

/// Selected Category Name Provider
///
/// Manages the currently selected blog category name (from Frappe API).
/// null means "All" is selected (show all categories).
///
/// Examples: "tin-tức", "dự-án", "chuyên-môn", "khuyến-mãi"

@ProviderFor(SelectedCategoryName)
const selectedCategoryNameProvider = SelectedCategoryNameProvider._();

/// Selected Category Name Provider
///
/// Manages the currently selected blog category name (from Frappe API).
/// null means "All" is selected (show all categories).
///
/// Examples: "tin-tức", "dự-án", "chuyên-môn", "khuyến-mãi"
final class SelectedCategoryNameProvider
    extends $NotifierProvider<SelectedCategoryName, String?> {
  /// Selected Category Name Provider
  ///
  /// Manages the currently selected blog category name (from Frappe API).
  /// null means "All" is selected (show all categories).
  ///
  /// Examples: "tin-tức", "dự-án", "chuyên-môn", "khuyến-mãi"
  const SelectedCategoryNameProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'selectedCategoryNameProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

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

String _$selectedCategoryNameHash() =>
    r'8dfbf490b986275e6ed9d7b423ae16f074c7fa36';

/// Selected Category Name Provider
///
/// Manages the currently selected blog category name (from Frappe API).
/// null means "All" is selected (show all categories).
///
/// Examples: "tin-tức", "dự-án", "chuyên-môn", "khuyến-mãi"

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

/// Filtered News Articles Provider
///
/// Returns news articles filtered by selected blog category name.
/// Excludes the first article (which is shown as featured).
/// If no category is selected, returns all articles except first.
///
/// The blog_category name from API is stored in article.tags[0] for filtering.

@ProviderFor(filteredNewsArticles)
const filteredNewsArticlesProvider = FilteredNewsArticlesProvider._();

/// Filtered News Articles Provider
///
/// Returns news articles filtered by selected blog category name.
/// Excludes the first article (which is shown as featured).
/// If no category is selected, returns all articles except first.
///
/// The blog_category name from API is stored in article.tags[0] for filtering.

final class FilteredNewsArticlesProvider
    extends
        $FunctionalProvider<
          AsyncValue<List<NewsArticle>>,
          List<NewsArticle>,
          FutureOr<List<NewsArticle>>
        >
    with
        $FutureModifier<List<NewsArticle>>,
        $FutureProvider<List<NewsArticle>> {
  /// Filtered News Articles Provider
  ///
  /// Returns news articles filtered by selected blog category name.
  /// Excludes the first article (which is shown as featured).
  /// If no category is selected, returns all articles except first.
  ///
  /// The blog_category name from API is stored in article.tags[0] for filtering.
  const FilteredNewsArticlesProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'filteredNewsArticlesProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<List<NewsArticle>> create(Ref ref) {
    return filteredNewsArticles(ref);
  }
}

String _$filteredNewsArticlesHash() =>
    r'52b823eabce0acfbef33cc85b5f31f3e9588df4f';

/// News Article by ID Provider
///
/// Fetches a specific article by ID from the Frappe API.
/// Uses frappe.client.get endpoint to fetch the full blog post detail.
/// Used for article detail page.

@ProviderFor(newsArticleById)
const newsArticleByIdProvider = NewsArticleByIdFamily._();

/// News Article by ID Provider
///
/// Fetches a specific article by ID from the Frappe API.
/// Uses frappe.client.get endpoint to fetch the full blog post detail.
/// Used for article detail page.

final class NewsArticleByIdProvider
    extends
        $FunctionalProvider<
          AsyncValue<NewsArticle?>,
          NewsArticle?,
          FutureOr<NewsArticle?>
        >
    with $FutureModifier<NewsArticle?>, $FutureProvider<NewsArticle?> {
  /// News Article by ID Provider
  ///
  /// Fetches a specific article by ID from the Frappe API.
  /// Uses frappe.client.get endpoint to fetch the full blog post detail.
  /// Used for article detail page.
  const NewsArticleByIdProvider._({
    required NewsArticleByIdFamily super.from,
    required String super.argument,
  }) : super(
         retry: null,
         name: r'newsArticleByIdProvider',
         isAutoDispose: true,
         dependencies: null,
         $allTransitiveDependencies: null,
       );

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

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

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

  @override
  FutureOr<NewsArticle?> create(Ref ref) {
    final argument = this.argument as String;
    return newsArticleById(ref, argument);
  }

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

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

String _$newsArticleByIdHash() => r'83e4790f0ebb80da5f0385f489ed2221fe769e3c';

/// News Article by ID Provider
///
/// Fetches a specific article by ID from the Frappe API.
/// Uses frappe.client.get endpoint to fetch the full blog post detail.
/// Used for article detail page.

final class NewsArticleByIdFamily extends $Family
    with $FunctionalFamilyOverride<FutureOr<NewsArticle?>, String> {
  const NewsArticleByIdFamily._()
    : super(
        retry: null,
        name: r'newsArticleByIdProvider',
        dependencies: null,
        $allTransitiveDependencies: null,
        isAutoDispose: true,
      );

  /// News Article by ID Provider
  ///
  /// Fetches a specific article by ID from the Frappe API.
  /// Uses frappe.client.get endpoint to fetch the full blog post detail.
  /// Used for article detail page.

  NewsArticleByIdProvider call(String articleId) =>
      NewsArticleByIdProvider._(argument: articleId, from: this);

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

/// Blog Categories Provider
///
/// Fetches all published blog categories from Frappe API.
/// Returns AsyncValue<List<BlogCategory>> (domain entities) for proper loading/error handling.
///
/// Example categories:
/// - Tin tức (News)
/// - Chuyên môn (Professional)
/// - Dự án (Projects)
/// - Khuyến mãi (Promotions)

@ProviderFor(blogCategories)
const blogCategoriesProvider = BlogCategoriesProvider._();

/// Blog Categories Provider
///
/// Fetches all published blog categories from Frappe API.
/// Returns AsyncValue<List<BlogCategory>> (domain entities) for proper loading/error handling.
///
/// Example categories:
/// - Tin tức (News)
/// - Chuyên môn (Professional)
/// - Dự án (Projects)
/// - Khuyến mãi (Promotions)

final class BlogCategoriesProvider
    extends
        $FunctionalProvider<
          AsyncValue<List<BlogCategory>>,
          List<BlogCategory>,
          FutureOr<List<BlogCategory>>
        >
    with
        $FutureModifier<List<BlogCategory>>,
        $FutureProvider<List<BlogCategory>> {
  /// Blog Categories Provider
  ///
  /// Fetches all published blog categories from Frappe API.
  /// Returns AsyncValue<List<BlogCategory>> (domain entities) for proper loading/error handling.
  ///
  /// Example categories:
  /// - Tin tức (News)
  /// - Chuyên môn (Professional)
  /// - Dự án (Projects)
  /// - Khuyến mãi (Promotions)
  const BlogCategoriesProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'blogCategoriesProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<List<BlogCategory>> create(Ref ref) {
    return blogCategories(ref);
  }
}

String _$blogCategoriesHash() => r'd87493142946be20ab309ea94d6173a8005b516e';
