/** * useFunnel Hook (v2) - TanStack Query-based funnel navigation * * Modern implementation using TanStack Query for state management * and the v2 ApiClient for API calls. */ import { FunnelAction, FunnelNavigationResult, SimpleFunnelContext } from '../../core/resources/funnel'; export interface UseFunnelOptions { funnelId?: string; currentStepId?: string; onNavigate?: (result: FunnelNavigationResult) => void | boolean; onError?: (error: Error) => void; autoInitialize?: boolean; enabled?: boolean; } export interface UseFunnelResult { next: (event: FunnelAction) => Promise; goToStep: (stepId: string) => Promise; updateContext: (updates: Partial) => Promise; currentStep: { id: string; }; context: SimpleFunnelContext | null; isLoading: boolean; isInitialized: boolean; isNavigating: boolean; initializeSession: (entryStepId?: string) => Promise; endSession: () => Promise; retryInitialization: () => Promise; initializationError: Error | null; isSessionLoading: boolean; sessionError: Error | null; refetch: () => void; } /** * React Hook for Funnel Navigation (Plugin SDK v2) * * Modern funnel navigation using TanStack Query for state management * and the v2 ApiClient architecture. */ export declare function useFunnel(options?: UseFunnelOptions): UseFunnelResult; /** * Simplified funnel hook for basic step tracking (v2) */ export declare function useSimpleFunnel(funnelId: string, initialStepId?: string): { currentStepId: string; next: (event: FunnelAction) => Promise; goToStep: (stepId: string) => Promise; isLoading: boolean; context: SimpleFunnelContext<{}> | null; }; export type { FunnelAction as FunnelEvent, FunnelNavigationAction, FunnelNavigationResult, SimpleFunnelContext } from '../../core/resources/funnel';