import type { PrismSessionState } from "@prismlabs/web-scan-core"; import type { PrismInstance } from "../widgetConfig"; import { PRISM_LOADED_EVENT, PRISM_SCAN_COMPLETE_EVENT, PRISM_STATE_CHANGE_EVENT } from "./EventNames"; export type PrismEventName = typeof PRISM_LOADED_EVENT | typeof PRISM_STATE_CHANGE_EVENT | typeof PRISM_SCAN_COMPLETE_EVENT; export type PrismEventMap = { [PRISM_LOADED_EVENT]: { prism: PrismInstance; }; [PRISM_STATE_CHANGE_EVENT]: { state: PrismSessionState; }; [PRISM_SCAN_COMPLETE_EVENT]: { blob: Blob; }; }; type Handler = (payload: T) => void; declare class EventBus { private listeners; on(event: K, handler: Handler): () => void; remove(event: K, handler: Handler): void; emit(event: K, payload: PrismEventMap[K]): void; } export declare const prismEventBus: EventBus; export {};