export type FunnelStepExitReason = 'back' | 'replace' | 'cancel' | 'abandon'; export type FunnelNavigationOutcome = { type: 'complete'; selected?: Record; } | { type: 'exit'; reason: FunnelStepExitReason; }; export type FunnelStepVisit = { readonly visitId: number; readonly stepId: string; readonly startedAt: string; readonly outcome: null | 'completed' | 'exited'; }; export type FunnelStepLifecycleIntent = { readonly type: 'complete'; readonly selected?: Readonly>; readonly visit: FunnelStepVisit; } | { readonly type: 'exit'; readonly reason: FunnelStepExitReason; readonly visit: FunnelStepVisit; }; export type FunnelStepLifecycleStartIntent = { readonly type: 'start'; readonly visit: FunnelStepVisit; }; declare const funnelStepLifecycleStateBrand: unique symbol; export type FunnelStepLifecycleState = { readonly [funnelStepLifecycleStateBrand]: true; }; export declare const createFunnelStepLifecycleState: () => FunnelStepLifecycleState; export declare const startVisit: (state: FunnelStepLifecycleState, input: Pick) => FunnelStepLifecycleStartIntent | null; export declare const finishVisit: (state: FunnelStepLifecycleState, visitId: FunnelStepVisit["visitId"], outcome: FunnelNavigationOutcome) => FunnelStepLifecycleIntent | null; export {};