import { AnnotationType } from '@vue-pdf-viewer/shared'; import { AnnotationHighlight, AnnotationStamp, AnnotationFreeText } from '@/utils/types'; /** * Unified annotation type that can represent any annotation */ export type UnifiedAnnotation = AnnotationHighlight | AnnotationStamp | AnnotationFreeText; /** * Annotation event types for the unified event system */ export type AnnotationEventType = 'add' | 'update' | 'remove'; /** * Annotation event payload */ export interface AnnotationEvent { type: AnnotationEventType; annotationType: AnnotationType; annotation: T; pageIndex: number; } /** * Annotation event listener type */ export type AnnotationEventListener = (event: AnnotationEvent) => void; /** * Global event emitter for all annotation types * This provides a unified way to handle annotation updates across the application */ declare class AnnotationEventEmitter { private listeners; private globalListeners; /** * Emit an annotation event */ emit(event: AnnotationEvent): void; /** * Subscribe to events for a specific annotation type */ subscribe(annotationType: AnnotationType, listener: AnnotationEventListener): () => void; /** * Subscribe to all annotation events */ subscribeAll(listener: AnnotationEventListener): () => void; /** * Clear all listeners */ clear(): void; } export declare const annotationEventEmitter: AnnotationEventEmitter; export {};