/**
 * Details of the most recent WebSocket close event.
 *
 * @kosService core.use-connection-state
 * @kosApiLevel 23
 */
export interface DisconnectInfo {
    code: number;
    reason: string;
    wasClean: boolean;
    /** Wall-clock time (Date.now()) when the disconnect was observed. */
    at: number;
}
/**
 * Current KOS Core connection state plus info about the last disconnect.
 *
 * @kosService core.use-connection-state
 * @kosApiLevel 23
 */
export interface ConnectionState {
    online: boolean;
    lastDisconnect: DisconnectInfo | null;
    /** Milliseconds since the last disconnect, or null if none observed. */
    sinceLastDisconnectMs: number | null;
}
/**
 * Observes KOS Core connection state.
 *
 * Returns the current `online` status plus information about the most recent
 * disconnect (code, reason, wasClean, timestamp). `sinceLastDisconnectMs` is
 * recomputed on each render; components that need it to tick continuously
 * should re-render themselves via an interval.
 *
 * @kosService core.use-connection-state
 * @kosApiLevel 23
 */
export declare const useConnectionState: () => ConnectionState;
//# sourceMappingURL=use-connection-state.d.ts.map