import type { PDFDocumentProxy } from "pdfjs-dist";
import type { EventBus, PDFFindController, PDFViewer } from "pdfjs-dist/web/pdf_viewer.mjs";
import type { RefObject } from "react";
import type { PdfSource } from "../types.js";
import type { AnnotationPortalTarget } from "./usePdfAnnotationPortals.js";
export interface UsePdfViewerCoreOptions {
	/** PDF source — URL string, ArrayBuffer, Uint8Array, or Blob */
	src: PdfSource;
	/** Initial page number (1-indexed, default 1) */
	initialPage?: number;
	/** Initial zoom scale (default 1.0) */
	initialScale?: number;
	/** Whether auto-size (fit to width) is initially enabled (default false) */
	initialAutoSize?: boolean;
}
export interface UsePdfViewerCoreResult {
	/** The loaded PDF document, or undefined while loading */
	document: PDFDocumentProxy | undefined;
	/** Total number of pages in the document */
	numPages: number;
	/** Whether the document is currently loading */
	loading: boolean;
	/** Error encountered while loading the document */
	error: Error | undefined;
	/** Ref to attach to the scroll-container div */
	containerRef: RefObject<HTMLDivElement>;
	/** Ref to attach to the inner viewer div (className="pdfViewer") */
	viewerRef: RefObject<HTMLDivElement>;
	/** Current page number (1-indexed) */
	currentPage: number;
	/** Navigate to a specific page (updates state and scrolls the viewer) */
	scrollToPage: (page: number) => void;
	/** Current zoom scale */
	scale: number;
	/** Set the zoom scale directly */
	setScale: (scale: number) => void;
	/** Whether auto-size (fit to width) is active */
	autoSize: boolean;
	/** Enable or disable auto-size */
	setAutoSize: (autoSize: boolean) => void;
	/** Portal targets for rendering annotation overlays on each page */
	portalTargets: AnnotationPortalTarget[];
	/** Ref to the internal pdfjs PDFViewer instance */
	pdfViewerRef: RefObject<PDFViewer | null>;
	/** Ref to the internal pdfjs EventBus instance */
	eventBusRef: RefObject<EventBus | null>;
	/** Ref to the internal pdfjs PDFFindController instance */
	findControllerRef: RefObject<PDFFindController | null>;
}
export declare function usePdfViewerCore({ src, initialPage, initialScale, initialAutoSize }: UsePdfViewerCoreOptions): UsePdfViewerCoreResult;
