import { PLATFORM_TYPE, CLIENT_TYPE, CDP_EVENT_TYPE } from '../constants/cdp.const'; import { usePitcherApi } from '../sdk/main'; type EventType = 'active' | 'passive'; type EventLifecycle = 'enter' | 'exit'; export type InactiveEventPayload = { platform?: (typeof PLATFORM_TYPE)[keyof typeof PLATFORM_TYPE]; client?: (typeof CLIENT_TYPE)[keyof typeof CLIENT_TYPE]; pair_id?: string; file_id?: string; [key: string]: any; }; export default function (track: (eventName: string, payload: any) => void, pitcherApi?: ReturnType): { registerInactiveEvent: ({ id, payload, enterEvent, exitEvent, type, }: { id: string; payload: InactiveEventPayload | ((type?: EventLifecycle) => InactiveEventPayload); enterEvent: (typeof CDP_EVENT_TYPE)[keyof typeof CDP_EVENT_TYPE]; exitEvent: (typeof CDP_EVENT_TYPE)[keyof typeof CDP_EVENT_TYPE]; type?: EventType; }) => string | void; unregisterInactiveEvent: (id: string, canvas_correlation_id?: string) => void; }; export {};