import { E as EngineAnnouncementConfig, a as AnnouncementsEngineState, Q as QueueConfig, D as DismissalReason, b as AnnouncementState, c as AnnouncementStorageAdapter, I as IsScheduleActive } from '../types-MpBl5-ej.cjs'; export { d as AnnouncementPriority, A as AnnouncementVariant, e as DEFAULT_QUEUE_CONFIG, P as PriorityOrder, f as QueueItem, S as StackBehavior } from '../types-MpBl5-ej.cjs'; import { Handle } from '@tour-kit/core/engine'; export { e as evaluateAnnouncementAudience } from '../eligibility-CpRraSbH.cjs'; export { F as FORCE_SHOW_BYPASS, a as ForceShowBypassKey } from '../reducer-CkKL7M9K.cjs'; import '@tour-kit/scheduling/engine'; /** * The three events the engine emits. A literal union rather than `string`, so * the binding can forward straight into `@tour-kit/analytics`' `track` — * whose parameter is the narrower `TourEventName` — with no cast at the * boundary. (All three are members of that union; measured.) */ type AnnouncementsAnalyticsEvent = 'announcement_shown' | 'announcement_dismissed' | 'announcement_completed'; /** The analytics shape the engine needs — a callback, not a package. */ interface AnnouncementsAnalytics { track(event: AnnouncementsAnalyticsEvent, payload: { tourId: string; metadata: Record; }): void; } interface AnnouncementsEngineOptions { announcements?: TConfig[]; queueConfig?: Partial; storage?: AnnouncementStorageAdapter | null; storageKey?: string; userContext?: Record; /** Segment map. `{}` fails every segment audience CLOSED — today's default. */ segments?: Record; analytics?: AnnouncementsAnalytics | null; now?: () => Date; /** * The optional `@tour-kit/scheduling` peer. Default is the scheduler's own * call-time `require`, which degrades OPEN when `require` is absent — i.e. * in every ESM build. An ESM consumer passes `isScheduleActive` from * `@tour-kit/scheduling/engine` to get real gating (Decision 7b). */ isScheduleActive?: IsScheduleActive; onShow?: (id: string) => void; onDismiss?: (id: string, reason: DismissalReason) => void; onComplete?: (id: string) => void; /** * A pre-built seed. `createAnnouncementsHandle` passes the SAME object it * serves as its pre-verb snapshot — two equal-but-distinct objects make * `Object.is` false and every consumer renders twice on construction * (Phase 2's finding). */ initialState?: AnnouncementsEngineState; } interface AnnouncementsEngine { getState: () => AnnouncementsEngineState; subscribe: (listener: () => void) => () => void; destroy: () => void; boot: () => void; register: (config: TConfig) => void; unregister: (id: string) => void; setAnnouncements: (configs: TConfig[]) => void; setUserContext: (userContext: Record | undefined) => void; setSegments: (segments: Record) => void; setQueueConfig: (queueConfig: Partial) => void; show: (id: string) => void; forceShow: (id: string) => void; hide: (id: string) => void; dismiss: (id: string, reason?: DismissalReason) => void; complete: (id: string) => void; reset: (id: string) => void; resetAll: () => void; getAnnouncementState: (id: string) => AnnouncementState | undefined; getConfig: (id: string) => TConfig | undefined; canShow: (id: string) => boolean; showNext: () => void; clearQueue: () => void; /** The eligible-id set, for the binding's own filtered list. */ getEligibleIds: () => ReadonlySet; } declare function emptyAnnouncementsState(): AnnouncementsEngineState; /** * A storage-free, boot-free seed so a binding's FIRST render already carries * the configs. One reducer pass, no side effects — the shape Phase 2 landed as * `seedChecklistsState`. */ declare function seedAnnouncementsState(configs: TConfig[], segments?: Record): AnnouncementsEngineState; declare function createAnnouncementsEngine(options?: AnnouncementsEngineOptions): AnnouncementsEngine; type AnnouncementsHandle = Handle, AnnouncementsEngineState>; declare function createAnnouncementsHandle(options?: AnnouncementsEngineOptions): AnnouncementsHandle; export { AnnouncementState, AnnouncementStorageAdapter, type AnnouncementsAnalytics, type AnnouncementsAnalyticsEvent, type AnnouncementsEngine, type AnnouncementsEngineOptions, AnnouncementsEngineState, type AnnouncementsHandle, DismissalReason, EngineAnnouncementConfig, IsScheduleActive, QueueConfig, createAnnouncementsEngine, createAnnouncementsHandle, emptyAnnouncementsState, seedAnnouncementsState };