import Foundation

/// Entspricht `SocketEvent.kt` (Android).
enum SocketEvent: Sendable {
    case connected(sessionId: String?, loggedIn: Bool, user: UserDto?)
    case loginSuccess(sessionId: String?, user: UserDto?)
    case userList(users: [UserDto])
    case incomingMessage(ChatMessageDto)
    case messageSent(messageId: String?, to: String?)
    case conversation(withUserName: String, messages: [ChatMessageDto])
    case searchResults([UserDto])
    case historyResults([HistoryItemDto])
    case inboxResults([InboxItemDto])
    case unreadChats(count: Int)
    case userBlocked(String)
    case userUnblocked(String)
    case commandResult(lines: [String], kind: String)
    case commandTable(title: String, columns: [String], rows: [[String]])
    case error(String)
    case connectionChanged(connected: Bool, reason: String?)
}
