import { type ChatBootFailedStep } from "../../store/boot"; import { ConnectStatus } from "../../types/chat"; export type ChatBootPhase = "engine" | "connect" | "sync" | "ready" | "error"; export interface ChatBootState { phase: ChatBootPhase; /** Step that failed when `phase` is "error". */ failedStep: ChatBootFailedStep | null; /** 0-100, meaningful in the "sync" phase. */ syncProgress: number; /** The current step has run longer than the caller's `slowAfterMs`. */ isSlow: boolean; /** False for the first moments, so a fast cached boot never flashes status text. */ isStatusVisible: boolean; } export declare const BOOT_STATUS_DELAY_MS = 600; /** A connect or sync step that sees no change for this long is treated as stuck. */ export declare const BOOT_STALL_MS = 30000; interface ResolveBootPhaseInput { connectStatus: ConnectStatus; hasConnected: boolean; isFirstSyncDone: boolean; failedStep: ChatBootFailedStep | null; } export declare const resolveChatBootPhase: ({ connectStatus, hasConnected, isFirstSyncDone, failedStep, }: ResolveBootPhaseInput) => ChatBootPhase; /** Where the chat engine is in its boot: WASM + login, connect, first sync, ready, or failed. */ export declare const useChatBootPhase: ({ slowAfterMs, }: { slowAfterMs: number; }) => ChatBootState; export {}; //# sourceMappingURL=useChatBootPhase.d.ts.map