// Common type definitions used across the PDF viewer components

declare module '*.js' {
  const content: any;
  export default content;
}

// Common utility types
type DispatchRenderFunction = (
  pageNum: number,
  scale: number,
  vpWidth: number,
  vpHeight: number,
  gen: number,
  quality: number
) => void;

type ZoomCallback = (
  newScale: number,
  bufferSet: Set<number>,
  visibleSet: Set<number>
) => void;

type GetVisibilityState = () => {
  bufferSet: Set<number>;
  visibleSet: Set<number>;
};

// Annotation types
interface Quad {
  points: { x: number; y: number }[];
}

interface Annotation {
  id: string;
  page: number;
  quads: Quad[];
  content?: string;
  color?: string;
  type: string;
}

// Performance monitoring types
interface PerformanceStats {
  fps: number;
  avgFrameTime: number;
  renderQuality: number;
  adaptiveMode: boolean;
}

// Viewport and geometry types
interface Viewport {
  width: number;
  height: number;
}

interface BoundingBox {
  x: number;
  y: number;
  width: number;
  height: number;
}