// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'register_provider.dart';

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

// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint, type=warning
/// Registration State Provider
///
/// Main provider for user registration state management.
/// Handles registration process with role-based validation.
///
/// Usage in widgets:
/// ```dart
/// final registerState = ref.watch(registerProvider);
/// registerState.when(
///   data: (user) => SuccessScreen(user),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```

@ProviderFor(Register)
const registerProvider = RegisterProvider._();

/// Registration State Provider
///
/// Main provider for user registration state management.
/// Handles registration process with role-based validation.
///
/// Usage in widgets:
/// ```dart
/// final registerState = ref.watch(registerProvider);
/// registerState.when(
///   data: (user) => SuccessScreen(user),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```
final class RegisterProvider extends $AsyncNotifierProvider<Register, User?> {
  /// Registration State Provider
  ///
  /// Main provider for user registration state management.
  /// Handles registration process with role-based validation.
  ///
  /// Usage in widgets:
  /// ```dart
  /// final registerState = ref.watch(registerProvider);
  /// registerState.when(
  ///   data: (user) => SuccessScreen(user),
  ///   loading: () => LoadingIndicator(),
  ///   error: (error, stack) => ErrorWidget(error),
  /// );
  /// ```
  const RegisterProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'registerProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

String _$registerHash() => r'a073b5c5958b74c63a3cddfec7f6f018e14a5088';

/// Registration State Provider
///
/// Main provider for user registration state management.
/// Handles registration process with role-based validation.
///
/// Usage in widgets:
/// ```dart
/// final registerState = ref.watch(registerProvider);
/// registerState.when(
///   data: (user) => SuccessScreen(user),
///   loading: () => LoadingIndicator(),
///   error: (error, stack) => ErrorWidget(error),
/// );
/// ```

abstract class _$Register 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 registration is in progress
///
/// Usage:
/// ```dart
/// final isRegistering = ref.watch(isRegisteringProvider);
/// if (isRegistering) {
///   // Show loading indicator
/// }
/// ```

@ProviderFor(isRegistering)
const isRegisteringProvider = IsRegisteringProvider._();

/// Convenience provider for checking if registration is in progress
///
/// Usage:
/// ```dart
/// final isRegistering = ref.watch(isRegisteringProvider);
/// if (isRegistering) {
///   // Show loading indicator
/// }
/// ```

final class IsRegisteringProvider extends $FunctionalProvider<bool, bool, bool>
    with $Provider<bool> {
  /// Convenience provider for checking if registration is in progress
  ///
  /// Usage:
  /// ```dart
  /// final isRegistering = ref.watch(isRegisteringProvider);
  /// if (isRegistering) {
  ///   // Show loading indicator
  /// }
  /// ```
  const IsRegisteringProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'isRegisteringProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

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

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

String _$isRegisteringHash() => r'2108b87b37451de9aaf799f9b8b380924bed2c87';

/// Convenience provider for checking if registration was successful
///
/// Usage:
/// ```dart
/// final success = ref.watch(registrationSuccessProvider);
/// if (success) {
///   // Navigate to pending approval or OTP screen
/// }
/// ```

@ProviderFor(registrationSuccess)
const registrationSuccessProvider = RegistrationSuccessProvider._();

/// Convenience provider for checking if registration was successful
///
/// Usage:
/// ```dart
/// final success = ref.watch(registrationSuccessProvider);
/// if (success) {
///   // Navigate to pending approval or OTP screen
/// }
/// ```

final class RegistrationSuccessProvider
    extends $FunctionalProvider<bool, bool, bool>
    with $Provider<bool> {
  /// Convenience provider for checking if registration was successful
  ///
  /// Usage:
  /// ```dart
  /// final success = ref.watch(registrationSuccessProvider);
  /// if (success) {
  ///   // Navigate to pending approval or OTP screen
  /// }
  /// ```
  const RegistrationSuccessProvider._()
    : super(
        from: null,
        argument: null,
        retry: null,
        name: r'registrationSuccessProvider',
        isAutoDispose: true,
        dependencies: null,
        $allTransitiveDependencies: null,
      );

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

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

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

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

String _$registrationSuccessHash() =>
    r'6435b9ca4bf4c287497a39077a5d4558e0515ddc';
