import 'package:equatable/equatable.dart';

abstract class ConnectionEvent extends Equatable {
  const ConnectionEvent();

  @override
  List<Object?> get props => [];
}

/// Connect to all servers
class ConnectAll extends ConnectionEvent {
  const ConnectAll();
}

/// Connect to a specific server
class ConnectServer extends ConnectionEvent {
  final String serverId;

  const ConnectServer(this.serverId);

  @override
  List<Object?> get props => [serverId];
}

/// Disconnect from a specific server
class DisconnectServer extends ConnectionEvent {
  final String serverId;

  const DisconnectServer(this.serverId);

  @override
  List<Object?> get props => [serverId];
}

/// Disconnect from all servers
class DisconnectAll extends ConnectionEvent {
  const DisconnectAll();
}

/// Retry failed connections
class RetryConnections extends ConnectionEvent {
  const RetryConnections();
}

/// Connection status updated (internal)
class ConnectionStatusUpdated extends ConnectionEvent {
  final Map<String, bool> status;

  const ConnectionStatusUpdated(this.status);

  @override
  List<Object?> get props => [status];
}
