import Foundation

struct ClientState: Stateable {
    var jid: JID
    var lastError: ClientError?

    var connectionState: ConnectionState
    var streamState: StreamState
    var authState: AuthState
    var externalServicesState: ExternalServicesState
    var callState: CallState
}

// MARK: Init
extension ClientState {
    init(jid: JID) {
        self.jid = jid
        lastError = nil

        connectionState = .init()
        streamState = .init()
        authState = .init()
        externalServicesState = .init()
        callState = .init()
    }
}
