import { AnalyticsEventConfigEntry } from '../analytics/analyticsEventsConfig'; import { CtaHandlerName } from './ctaHandlers'; import { CtaContext, CtaHandlerContext, CtaState, CtaStateContext, CtaStep, RunHandlerOptions } from './types'; /** The beat's own context (input a block collected for it), `{}` until something is written. */ export declare const beatContextOf: ({ beat, stores }: Pick) => Record; /** The step named by the CTA's `action_key`, or the empty default (no key / unknown key). */ export declare const resolveStep: ({ cta }: Pick) => CtaStep; /** Pending always disables; the step's `disabledWhen` may add to that. */ export declare const resolveCtaState: (ctx: CtaStateContext) => CtaState; type AnalyticsCtx = Pick; /** * The one way to fire a catalogued analytics event. Takes the catalogue entry itself (e.g. * `ANALYTICS_EVENTS_CONFIG.PRIMARY_ACTION_SELECTED`), not a lookup key — the call site already * has the entry via property access, so there is no key to look up or mistype. Resolves the * payload and hands it to the host directly. Never throws: a failed fire is captured, it * cannot fail or disable anything. */ export declare const sendCtaAnalytics: (ctx: AnalyticsCtx, event: AnalyticsEventConfigEntry) => void; /** * Trigger 1 + the first-click bookkeeping together: every CTA press's generic analytics * (`Primary/Secondary Action Selected`), plus `FIRST_TIME_PRIMARY_ACTION_SELECTED` / * `cta_clicked_at` on the first primary press. The one call site for "a CTA got pressed", * used by the runner and by the contact-support bypass in `BaseLayout`. */ export declare const reportCtaClick: (ctx: AnalyticsCtx & Pick, { skipCtaClicked }?: { skipCtaClicked?: boolean; }) => void; export declare const runCtaAction: (ctx: CtaContext) => Promise; /** Runs a handler directly (drawer Save buttons). True on success. */ export declare const runCtaHandler: (ctx: CtaHandlerContext, handlerName: CtaHandlerName, { onSuccess, analytics }?: RunHandlerOptions) => Promise; export {};