type Sender = { send: (event: string, data: Record) => void; trackScreenView: (screenName: string) => void; }; declare function setAutoCaptureTracker(sender: Sender): void; /** * Pass directly to NavigationContainer's onStateChange prop. * Fires SCREEN_VIEW + TIME_SPENT automatically on every navigation. * * @example * import { onNohmoStateChange } from 'nohmo/react-native/autocapture' * */ declare function onNohmoStateChange(state: any): void; /** * Pass to NavigationContainer's onReady prop to also capture the initial screen. * Requires passing your navigationRef so the current route can be read. * * @example * import { onNohmoStateChange, makeNohmoReadyHandler } from 'nohmo/react-native/autocapture' * */ declare function makeNohmoReadyHandler(navigationRef: { current: { getCurrentRoute: () => { name: string; } | undefined; } | null; }): () => void; /** * Compose Nohmo's screen tracking with an `onStateChange` the app already passes. * * The plugin used to skip injection entirely when the prop was already set, which is * silent and total: you keep the one SCREEN_VIEW that `onReady` captures at startup and * never get another for the rest of the session. An app with its own onStateChange is * common (its own analytics, a screen-title sync), so the skip hit exactly the apps that * were already thinking about navigation. Nohmo runs first, then the app's handler. */ declare function composeNohmoStateChange unknown) | null | undefined>(userHandler: T): (state: any) => unknown; /** Same composition for `onReady`, which additionally needs the navigationRef to read * the initial route. */ declare function composeNohmoReady unknown) | null | undefined>(userHandler: T, navigationRef: { current: { getCurrentRoute: () => { name: string; } | undefined; } | null; }): (...args: any[]) => unknown; /** * Injected by the Nohmo Babel plugin around every onPress / onLongPress. * Fires a PRESS or LONG_PRESS event then calls the original handler. * * De-duplication: design-system buttons (e.g.