// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.0.

// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import

import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

import '../frb_generated.dart';
import 'accounts.dart';
import 'error.dart';

// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `fmt`, `from`

Future<RelayType> relayTypeNip65() => RustLib.instance.api.crateApiRelaysRelayTypeNip65();

Future<RelayType> relayTypeInbox() => RustLib.instance.api.crateApiRelaysRelayTypeInbox();

Future<RelayType> relayTypeKeyPackage() => RustLib.instance.api.crateApiRelaysRelayTypeKeyPackage();

Future<String> debugRelayControlState() =>
    RustLib.instance.api.crateApiRelaysDebugRelayControlState();

Future<void> ensureAllSubscriptions() =>
    RustLib.instance.api.crateApiRelaysEnsureAllSubscriptions();

class Relay {
  final String url;
  final DateTime createdAt;
  final DateTime updatedAt;

  const Relay({
    required this.url,
    required this.createdAt,
    required this.updatedAt,
  });

  @override
  int get hashCode => url.hashCode ^ createdAt.hashCode ^ updatedAt.hashCode;

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is Relay &&
          runtimeType == other.runtimeType &&
          url == other.url &&
          createdAt == other.createdAt &&
          updatedAt == other.updatedAt;
}
