import { N as NotificationEvent, e as NotificationEventType } from "../packem_shared/types.d-C7l7qdMG.js"; /** * An append-only timeline store for notification events. */ interface EventStore { append: (event: NotificationEvent) => void | Promise; timeline: (messageId: string) => NotificationEvent[] | Promise; } /** * In-memory {@link EventStore} keyed by message id. */ declare class MemoryEventStore implements EventStore { #private; append(event: NotificationEvent): void; timeline(messageId: string): NotificationEvent[]; } type NotificationEventListener = (event: NotificationEvent) => void; /** * A tiny synchronous event bus for notification lifecycle events. Listeners can subscribe * to a specific {@link NotificationEventType} or to all events with `"*"`. */ declare class NotificationEventBus { #private; /** * Subscribes to an event type (or `"*"` for all). * @param type A specific {@link NotificationEventType} to listen for, or `"*"` for every event. * @param listener The callback invoked with each matching event. * @returns An unsubscribe function. */ on(type: "*" | NotificationEventType, listener: NotificationEventListener): () => void; /** * Emits an event to matching listeners. * @param event The event to emit. */ emit(event: NotificationEvent): void; } export { type EventStore, MemoryEventStore, NotificationEventBus, NotificationEventListener };