import { type ReactNode } from "react"; import type { IdentifyInput, PublicInitOptions, SessionInfo, SessionUpdate, TrackEventAttributes, UpdatePayload, UserUpdate } from "../core/types"; export type MilanaContextValue = { isInitialized: boolean; initialize: () => Promise<{ success: boolean; }>; /** See `identify` on the core API. */ identify: (input: IdentifyInput) => Promise<{ success: boolean; }>; /** See `update` on the core API. */ update: (payload: UpdatePayload) => Promise<{ success: boolean; }>; /** See `updateUser` on the core API. */ updateUser: (user: UserUpdate) => Promise<{ success: boolean; }>; /** See `updateSession` on the core API. */ updateSession: (session: SessionUpdate) => Promise<{ success: boolean; }>; /** See `stopRecording` on the core API. */ stopRecording: () => Promise<{ success: boolean; }>; trackEvent: (eventName: string, attributes?: TrackEventAttributes) => void; }; export declare const MilanaContext: import("react").Context; export declare function useMilana(): MilanaContextValue; export declare function useMilanaOptional(): MilanaContextValue | null; export type MilanaProviderProps = { shouldDeferInitialization?: boolean; productId: string; clientKey: string; sessionInfo: SessionInfo; options?: PublicInitOptions; children: ReactNode; }; /** * Initializes Milana on mount using the provided props. * Initialization happens only once — changing props after mount has no effect. * * Set `shouldDeferInitialization` to skip auto-init on mount. Call * `milana.initialize()` later (e.g., after a feature flag resolves) to trigger * initialization. `trackEvent` and `update` calls queue normally and flush * once initialization completes. */ export declare function MilanaProvider({ shouldDeferInitialization, productId, clientKey, sessionInfo, options, children, }: MilanaProviderProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=index.d.ts.map