/** * Opt-in Pressable wrapper that emits a BUTTON_CLICK event regardless * of the `disableButtonTracking` flag. Hosts that have opted out of * the global `PressableTracker` monkey-patch can still annotate a * specific touchable with `` * for explicit per-button tracking. * * The host's Pressable is passed as a prop rather than imported, * mirroring the structural-typing approach used throughout the SDK: * the lib has no static dependency on `react-native`, which keeps * the bundle slim and the unit tests hermetic. * * Double-emit guard: when the host has the global `PressableTracker` * enabled, the passed-in `pressable` carries the `__keewanoWrapped` * marker. In that case we forward `buttonName` straight through (the * tracker's `pickButtonName` reads it as the top priority) and let * the inner wrapper fire BUTTON_CLICK. The wrapper-not-active path * does the report itself, calling the same `pickButtonName` helper * the tracker uses so both paths produce identical labels. * * Wrapped via `forwardRef` so a caller-supplied ref reaches the * underlying Pressable. Hosts that rely on imperative Pressable * methods (`focus`, `measure`, animation hooks) need the forwarded ref * to stay attached; matches the same ref-forwarding discipline as the * global PressableTracker wrapper. */ import type { KeewanoPressableExtraProps } from './types/KeewanoPressable'; /** * Render the host's Pressable with an `onPress` wrapper that reports * BUTTON_CLICK before invoking the caller's handler. When the host's * Pressable is the patched wrapper, forward `buttonName` through so * the inner wrapper emits the right label and skip our own emit. * * Missing-prop defence: a JS-only caller who omits the required * `pressable` prop renders nothing and a `console.error` surfaces * the misuse synchronously - matching the silent-degrade discipline * the rest of the SDK applies to user error. * * Preserve disabled / non-interactive controls: when the caller did * not supply `onPress`, do NOT inject a synthetic handler. Adding * one would turn an intentionally read-only Pressable into a * tappable element that emits BUTTON_CLICK, which both changes the * runtime behaviour and inflates analytics. Mirrors the same gate * the global PressableTracker wrapper applies on its render path. */ declare const KeewanoPressable: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export type { KeewanoPressableExtraProps } from './types/KeewanoPressable'; export { KeewanoPressable };