// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'link_preview.dart';

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

String _$linkPreviewHash() => r'5130593d3066155cb958d20714ee577df1f940d7';

/// 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));
  }
}

abstract class _$LinkPreview
    extends BuildlessAutoDisposeAsyncNotifier<SnScrappedLink?> {
  late final String url;

  FutureOr<SnScrappedLink?> build(String url);
}

/// See also [LinkPreview].
@ProviderFor(LinkPreview)
const linkPreviewProvider = LinkPreviewFamily();

/// See also [LinkPreview].
class LinkPreviewFamily extends Family<AsyncValue<SnScrappedLink?>> {
  /// See also [LinkPreview].
  const LinkPreviewFamily();

  /// See also [LinkPreview].
  LinkPreviewProvider call(String url) {
    return LinkPreviewProvider(url);
  }

  @override
  LinkPreviewProvider getProviderOverride(
    covariant LinkPreviewProvider provider,
  ) {
    return call(provider.url);
  }

  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'linkPreviewProvider';
}

/// See also [LinkPreview].
class LinkPreviewProvider
    extends AutoDisposeAsyncNotifierProviderImpl<LinkPreview, SnScrappedLink?> {
  /// See also [LinkPreview].
  LinkPreviewProvider(String url)
    : this._internal(
        () => LinkPreview()..url = url,
        from: linkPreviewProvider,
        name: r'linkPreviewProvider',
        debugGetCreateSourceHash:
            const bool.fromEnvironment('dart.vm.product')
                ? null
                : _$linkPreviewHash,
        dependencies: LinkPreviewFamily._dependencies,
        allTransitiveDependencies: LinkPreviewFamily._allTransitiveDependencies,
        url: url,
      );

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

  final String url;

  @override
  FutureOr<SnScrappedLink?> runNotifierBuild(covariant LinkPreview notifier) {
    return notifier.build(url);
  }

  @override
  Override overrideWith(LinkPreview Function() create) {
    return ProviderOverride(
      origin: this,
      override: LinkPreviewProvider._internal(
        () => create()..url = url,
        from: from,
        name: null,
        dependencies: null,
        allTransitiveDependencies: null,
        debugGetCreateSourceHash: null,
        url: url,
      ),
    );
  }

  @override
  AutoDisposeAsyncNotifierProviderElement<LinkPreview, SnScrappedLink?>
  createElement() {
    return _LinkPreviewProviderElement(this);
  }

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

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

    return _SystemHash.finish(hash);
  }
}

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

class _LinkPreviewProviderElement
    extends
        AutoDisposeAsyncNotifierProviderElement<LinkPreview, SnScrappedLink?>
    with LinkPreviewRef {
  _LinkPreviewProviderElement(super.provider);

  @override
  String get url => (origin as LinkPreviewProvider).url;
}

// 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
