// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'auth_provider.dart';

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

// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Provide FlutterSecureStorage instance

@ProviderFor(secureStorage)
const secureStorageProvider = SecureStorageProvider._();

/// Provide FlutterSecureStorage instance

final class SecureStorageProvider
    extends
        $FunctionalProvider<
          FlutterSecureStorage,
          FlutterSecureStorage,
          FlutterSecureStorage
        >
    with $Provider<FlutterSecureStorage> {
  /// Provide FlutterSecureStorage instance
  const SecureStorageProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'secureStorageProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FlutterSecureStorage create(Ref ref) {
    return secureStorage(ref);
  }

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

String _$secureStorageHash() => r'c3d90388f6d1bb7c95a29ceeda2e56c57deb1ecb';

/// Provide AuthLocalDataSource instance

@ProviderFor(authLocalDataSource)
const authLocalDataSourceProvider = AuthLocalDataSourceProvider._();

/// Provide AuthLocalDataSource instance

final class AuthLocalDataSourceProvider
    extends
        $FunctionalProvider<
          AuthLocalDataSource,
          AuthLocalDataSource,
          AuthLocalDataSource
        >
    with $Provider<AuthLocalDataSource> {
  /// Provide AuthLocalDataSource instance
  const AuthLocalDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'authLocalDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  AuthLocalDataSource create(Ref ref) {
    return authLocalDataSource(ref);
  }

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

String _$authLocalDataSourceHash() =>
    r'f104de00a8ab431f6736387fb499c2b6e0ab4924';

/// Provide FrappeAuthService instance

@ProviderFor(frappeAuthService)
const frappeAuthServiceProvider = FrappeAuthServiceProvider._();

/// Provide FrappeAuthService instance

final class FrappeAuthServiceProvider
    extends
        $FunctionalProvider<
          AsyncValue<FrappeAuthService>,
          FrappeAuthService,
          FutureOr<FrappeAuthService>
        >
    with
        $FutureModifier<FrappeAuthService>,
        $FutureProvider<FrappeAuthService> {
  /// Provide FrappeAuthService instance
  const FrappeAuthServiceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'frappeAuthServiceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<FrappeAuthService> create(Ref ref) {
    return frappeAuthService(ref);
  }
}

String _$frappeAuthServiceHash() => r'db239119c9a8510d3439a2d05a7fae1743be11c5';

/// Provide AuthRemoteDataSource instance

@ProviderFor(authRemoteDataSource)
const authRemoteDataSourceProvider = AuthRemoteDataSourceProvider._();

/// Provide AuthRemoteDataSource instance

final class AuthRemoteDataSourceProvider
    extends
        $FunctionalProvider<
          AsyncValue<AuthRemoteDataSource>,
          AuthRemoteDataSource,
          FutureOr<AuthRemoteDataSource>
        >
    with
        $FutureModifier<AuthRemoteDataSource>,
        $FutureProvider<AuthRemoteDataSource> {
  /// Provide AuthRemoteDataSource instance
  const AuthRemoteDataSourceProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'authRemoteDataSourceProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<AuthRemoteDataSource> create(Ref ref) {
    return authRemoteDataSource(ref);
  }
}

String _$authRemoteDataSourceHash() =>
    r'3c05cf67fe479a973fc4ce2db68a0abde37974a5';

/// Authentication Provider
///
/// Main provider for authentication state management.
/// Provides login and logout functionality with async state handling.
///
/// Usage in widgets:
/// ```dart
/// final authState = ref.watch(authProvider);
/// authState.when(
///   data: (user) => user != null ? HomeScreen() : LoginScreen(),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```

@ProviderFor(Auth)
const authProvider = AuthProvider._();

/// Authentication Provider
///
/// Main provider for authentication state management.
/// Provides login and logout functionality with async state handling.
///
/// Usage in widgets:
/// ```dart
/// final authState = ref.watch(authProvider);
/// authState.when(
///   data: (user) => user != null ? HomeScreen() : LoginScreen(),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```
final class AuthProvider extends $AsyncNotifierProvider<Auth, User?> {
  /// Authentication Provider
  ///
  /// Main provider for authentication state management.
  /// Provides login and logout functionality with async state handling.
  ///
  /// Usage in widgets:
  /// ```dart
  /// final authState = ref.watch(authProvider);
  /// authState.when(
  ///   data: (user) => user != null ? HomeScreen() : LoginScreen(),
  ///   loading: () => LoadingIndicator(),
  ///   error: (error, stack) => ErrorWidget(error),
  /// );
  /// ```
  const AuthProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'authProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

String _$authHash() => r'2aaad43ba390e824b5aa8d95bc14e514c421c8ef';

/// Authentication Provider
///
/// Main provider for authentication state management.
/// Provides login and logout functionality with async state handling.
///
/// Usage in widgets:
/// ```dart
/// final authState = ref.watch(authProvider);
/// authState.when(
///   data: (user) => user != null ? HomeScreen() : LoginScreen(),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```

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

/// Convenience provider for checking if user is authenticated
///
/// Usage:
/// ```dart
/// final isLoggedIn = ref.watch(isAuthenticatedProvider);
/// if (isLoggedIn) {
///   // Show home screen
/// }
/// ```

@ProviderFor(isAuthenticated)
const isAuthenticatedProvider = IsAuthenticatedProvider._();

/// Convenience provider for checking if user is authenticated
///
/// Usage:
/// ```dart
/// final isLoggedIn = ref.watch(isAuthenticatedProvider);
/// if (isLoggedIn) {
///   // Show home screen
/// }
/// ```

final class IsAuthenticatedProvider
    extends $FunctionalProvider<bool, bool, bool>
    with $Provider<bool> {
  /// Convenience provider for checking if user is authenticated
  ///
  /// Usage:
  /// ```dart
  /// final isLoggedIn = ref.watch(isAuthenticatedProvider);
  /// if (isLoggedIn) {
  ///   // Show home screen
  /// }
  /// ```
  const IsAuthenticatedProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'isAuthenticatedProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  bool create(Ref ref) {
    return isAuthenticated(ref);
  }

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

String _$isAuthenticatedHash() => r'dc783f052ad2ddb7fa18c58e5dc6d212e6c32a96';

/// Convenience provider for getting current user
///
/// Usage:
/// ```dart
/// final user = ref.watch(currentUserProvider);
/// if (user != null) {
///   Text('Welcome ${user.fullName}');
/// }
/// ```

@ProviderFor(currentUser)
const currentUserProvider = CurrentUserProvider._();

/// Convenience provider for getting current user
///
/// Usage:
/// ```dart
/// final user = ref.watch(currentUserProvider);
/// if (user != null) {
///   Text('Welcome ${user.fullName}');
/// }
/// ```

final class CurrentUserProvider extends $FunctionalProvider<User?, User?, User?>
    with $Provider<User?> {
  /// Convenience provider for getting current user
  ///
  /// Usage:
  /// ```dart
  /// final user = ref.watch(currentUserProvider);
  /// if (user != null) {
  ///   Text('Welcome ${user.fullName}');
  /// }
  /// ```
  const CurrentUserProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'currentUserProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  User? create(Ref ref) {
    return currentUser(ref);
  }

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

String _$currentUserHash() => r'f3c1da551f4a4c2bf158782ea37a4749a718128a';

/// Convenience provider for user's loyalty tier
///
/// Returns the current user's loyalty tier or null if not logged in.
///
/// Usage:
/// ```dart
/// final tier = ref.watch(userLoyaltyTierProvider);
/// if (tier != null) {
///   Text('Tier: ${tier.displayName}');
/// }
/// ```

@ProviderFor(userLoyaltyTier)
const userLoyaltyTierProvider = UserLoyaltyTierProvider._();

/// Convenience provider for user's loyalty tier
///
/// Returns the current user's loyalty tier or null if not logged in.
///
/// Usage:
/// ```dart
/// final tier = ref.watch(userLoyaltyTierProvider);
/// if (tier != null) {
///   Text('Tier: ${tier.displayName}');
/// }
/// ```

final class UserLoyaltyTierProvider
    extends $FunctionalProvider<LoyaltyTier?, LoyaltyTier?, LoyaltyTier?>
    with $Provider<LoyaltyTier?> {
  /// Convenience provider for user's loyalty tier
  ///
  /// Returns the current user's loyalty tier or null if not logged in.
  ///
  /// Usage:
  /// ```dart
  /// final tier = ref.watch(userLoyaltyTierProvider);
  /// if (tier != null) {
  ///   Text('Tier: ${tier.displayName}');
  /// }
  /// ```
  const UserLoyaltyTierProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'userLoyaltyTierProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  LoyaltyTier? create(Ref ref) {
    return userLoyaltyTier(ref);
  }

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

String _$userLoyaltyTierHash() => r'f1a157486b8bdd2cf64bc2201207f2ac71ea6a69';

/// Convenience provider for user's total points
///
/// Returns the current user's total loyalty points or 0 if not logged in.
///
/// Usage:
/// ```dart
/// final points = ref.watch(userTotalPointsProvider);
/// Text('Points: $points');
/// ```

@ProviderFor(userTotalPoints)
const userTotalPointsProvider = UserTotalPointsProvider._();

/// Convenience provider for user's total points
///
/// Returns the current user's total loyalty points or 0 if not logged in.
///
/// Usage:
/// ```dart
/// final points = ref.watch(userTotalPointsProvider);
/// Text('Points: $points');
/// ```

final class UserTotalPointsProvider extends $FunctionalProvider<int, int, int>
    with $Provider<int> {
  /// Convenience provider for user's total points
  ///
  /// Returns the current user's total loyalty points or 0 if not logged in.
  ///
  /// Usage:
  /// ```dart
  /// final points = ref.watch(userTotalPointsProvider);
  /// Text('Points: $points');
  /// ```
  const UserTotalPointsProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'userTotalPointsProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

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

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

String _$userTotalPointsHash() => r'9ccebb48a8641c3c0624b1649303b436e82602bd';

/// Initialize Frappe session
///
/// Call this to ensure a Frappe session exists before making API calls.
/// This is separate from the Auth provider to avoid disposal issues.
///
/// Usage:
/// ```dart
/// // On login page or before API calls that need session
/// await ref.read(initializeFrappeSessionProvider.future);
/// ```

@ProviderFor(initializeFrappeSession)
const initializeFrappeSessionProvider = InitializeFrappeSessionProvider._();

/// Initialize Frappe session
///
/// Call this to ensure a Frappe session exists before making API calls.
/// This is separate from the Auth provider to avoid disposal issues.
///
/// Usage:
/// ```dart
/// // On login page or before API calls that need session
/// await ref.read(initializeFrappeSessionProvider.future);
/// ```

final class InitializeFrappeSessionProvider
    extends $FunctionalProvider<AsyncValue<void>, void, FutureOr<void>>
    with $FutureModifier<void>, $FutureProvider<void> {
  /// Initialize Frappe session
  ///
  /// Call this to ensure a Frappe session exists before making API calls.
  /// This is separate from the Auth provider to avoid disposal issues.
  ///
  /// Usage:
  /// ```dart
  /// // On login page or before API calls that need session
  /// await ref.read(initializeFrappeSessionProvider.future);
  /// ```
  const InitializeFrappeSessionProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'initializeFrappeSessionProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

  @override
  FutureOr<void> create(Ref ref) {
    return initializeFrappeSession(ref);
  }
}

String _$initializeFrappeSessionHash() =>
    r'1a9001246a39396e4712efc2cbeb0cac8b911f0c';
