export function getEditorSocketReadyStateLabel(readyState) {
    switch (readyState) {
        case WebSocket.CONNECTING:
            return "connecting";
        case WebSocket.OPEN:
            return "open";
        case WebSocket.CLOSING:
            return "closing";
        case WebSocket.CLOSED:
            return "closed";
        default:
            return "uninitialized";
    }
}
export function createEditorSocketDiagnostics(sessionId) {
    return {
        sessionId,
        readyState: null,
        readyStateLabel: "uninitialized",
        reconnectCount: 0,
        lastEventType: "idle",
        lastEventAt: null,
        lastOpenAt: null,
        lastMessageAt: null,
        lastCloseAt: null,
        lastErrorAt: null,
        lastCloseCode: null,
        lastCloseReason: null,
        lastErrorMessage: null,
    };
}
//# sourceMappingURL=socketDiagnostics.js.map