import type { CallDirection, CallEndReason, CallEvent, CallMetadata } from "../ExpoVicallCallManager.types"; /** * High-level call phase for host apps that own their own in-call UI * (X / social-network style: system UI for ring/lock screen, app UI for the * ongoing call canvas). */ export type CallLifecyclePhase = "idle" | "ringing" | "dialing" | "connecting" | "active" | "held" | "ended"; /** * Synthetic lifecycle inputs that are not native CallEvents. * Hosts emit `callBecameActive` after media is joined and `setCallActive` succeeds. */ export type CallLifecycleInput = CallEvent | { type: "callBecameActive"; callId: string; } | { type: "reset"; }; export interface CallLifecycleState { phase: CallLifecyclePhase; activeCallId: string | null; direction: CallDirection | null; displayName: string | null; handle: string | null; hasVideo: boolean; muted: boolean; held: boolean; metadata: CallMetadata; endReason: CallEndReason | string | null; /** * When true, the host app should mount its own audio/video call screen. * System incoming UI is owned by CallKit / Telecom, not by this flag. */ shouldPresentAppCallUi: boolean; lastEventType: string | null; lastEventAt: number | null; } export declare function createInitialCallLifecycleState(): CallLifecycleState; /** * Pure reducer that turns system call events into UI-driving lifecycle state. * The module never renders screens; hosts use this to open/close their own UI. */ export declare function reduceCallLifecycle(state: CallLifecycleState, input: CallLifecycleInput): CallLifecycleState; //# sourceMappingURL=call-lifecycle.d.ts.map