// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'profile_notifier.dart';

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

String _$currentProfileHash() => r'85ba418ee60fcd6612e3fd87974ed10e11a32dae';

/// Live profile of the currently signed-in user. Emits null while loading or
/// when no user is signed in.
///
/// Copied from [currentProfile].
@ProviderFor(currentProfile)
final currentProfileProvider = AutoDisposeStreamProvider<UserProfile?>.internal(
  currentProfile,
  name: r'currentProfileProvider',
  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
      ? null
      : _$currentProfileHash,
  dependencies: null,
  allTransitiveDependencies: null,
);

@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef CurrentProfileRef = AutoDisposeStreamProviderRef<UserProfile?>;
String _$currentUserRoleHash() => r'ba507519e5fa744f668b87b9685e5454fcf9ab0a';

/// Resolves the effective [UserRole] for the current session. Admin status is
/// determined by email allow-list first (so seed-data admins work before
/// they've even loaded a profile doc); otherwise the Firestore-stored role is
/// used, defaulting to [UserRole.viewer] when not logged in.
///
/// Copied from [currentUserRole].
@ProviderFor(currentUserRole)
final currentUserRoleProvider = AutoDisposeProvider<UserRole>.internal(
  currentUserRole,
  name: r'currentUserRoleProvider',
  debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
      ? null
      : _$currentUserRoleHash,
  dependencies: null,
  allTransitiveDependencies: null,
);

@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
typedef CurrentUserRoleRef = AutoDisposeProviderRef<UserRole>;
String _$profileByIdHash() => r'b485a02150bfb480bc4a9ed04b4a66b8c92e2958';

/// Copied from Dart SDK
class _SystemHash {
  _SystemHash._();

  static int combine(int hash, int value) {
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + value);
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
    return hash ^ (hash >> 6);
  }

  static int finish(int hash) {
    // ignore: parameter_assignments
    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) << 3));
    // ignore: parameter_assignments
    hash = hash ^ (hash >> 11);
    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
  }
}

/// One-shot lookup of an arbitrary user profile by uid. Used by the public
/// player profile screen.
///
/// Copied from [profileById].
@ProviderFor(profileById)
const profileByIdProvider = ProfileByIdFamily();

/// One-shot lookup of an arbitrary user profile by uid. Used by the public
/// player profile screen.
///
/// Copied from [profileById].
class ProfileByIdFamily extends Family<AsyncValue<UserProfile?>> {
  /// One-shot lookup of an arbitrary user profile by uid. Used by the public
  /// player profile screen.
  ///
  /// Copied from [profileById].
  const ProfileByIdFamily();

  /// One-shot lookup of an arbitrary user profile by uid. Used by the public
  /// player profile screen.
  ///
  /// Copied from [profileById].
  ProfileByIdProvider call(String uid) {
    return ProfileByIdProvider(uid);
  }

  @override
  ProfileByIdProvider getProviderOverride(
    covariant ProfileByIdProvider provider,
  ) {
    return call(provider.uid);
  }

  static const Iterable<ProviderOrFamily>? _dependencies = null;

  @override
  Iterable<ProviderOrFamily>? get dependencies => _dependencies;

  static const Iterable<ProviderOrFamily>? _allTransitiveDependencies = null;

  @override
  Iterable<ProviderOrFamily>? get allTransitiveDependencies =>
      _allTransitiveDependencies;

  @override
  String? get name => r'profileByIdProvider';
}

/// One-shot lookup of an arbitrary user profile by uid. Used by the public
/// player profile screen.
///
/// Copied from [profileById].
class ProfileByIdProvider extends AutoDisposeFutureProvider<UserProfile?> {
  /// One-shot lookup of an arbitrary user profile by uid. Used by the public
  /// player profile screen.
  ///
  /// Copied from [profileById].
  ProfileByIdProvider(String uid)
    : this._internal(
        (ref) => profileById(ref as ProfileByIdRef, uid),
        from: profileByIdProvider,
        name: r'profileByIdProvider',
        debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
            ? null
            : _$profileByIdHash,
        dependencies: ProfileByIdFamily._dependencies,
        allTransitiveDependencies: ProfileByIdFamily._allTransitiveDependencies,
        uid: uid,
      );

  ProfileByIdProvider._internal(
    super._createNotifier, {
    required super.name,
    required super.dependencies,
    required super.allTransitiveDependencies,
    required super.debugGetCreateSourceHash,
    required super.from,
    required this.uid,
  }) : super.internal();

  final String uid;

  @override
  Override overrideWith(
    FutureOr<UserProfile?> Function(ProfileByIdRef provider) create,
  ) {
    return ProviderOverride(
      origin: this,
      override: ProfileByIdProvider._internal(
        (ref) => create(ref as ProfileByIdRef),
        from: from,
        name: null,
        dependencies: null,
        allTransitiveDependencies: null,
        debugGetCreateSourceHash: null,
        uid: uid,
      ),
    );
  }

  @override
  AutoDisposeFutureProviderElement<UserProfile?> createElement() {
    return _ProfileByIdProviderElement(this);
  }

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

  @override
  int get hashCode {
    var hash = _SystemHash.combine(0, runtimeType.hashCode);
    hash = _SystemHash.combine(hash, uid.hashCode);

    return _SystemHash.finish(hash);
  }
}

@Deprecated('Will be removed in 3.0. Use Ref instead')
// ignore: unused_element
mixin ProfileByIdRef on AutoDisposeFutureProviderRef<UserProfile?> {
  /// The parameter `uid` of this provider.
  String get uid;
}

class _ProfileByIdProviderElement
    extends AutoDisposeFutureProviderElement<UserProfile?>
    with ProfileByIdRef {
  _ProfileByIdProviderElement(super.provider);

  @override
  String get uid => (origin as ProfileByIdProvider).uid;
}

// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
