import type { PDFDocumentProxy } from "pdfjs-dist";
import type { PDFViewer } from "pdfjs-dist/web/pdf_viewer.mjs";
import type { RefObject } from "react";
import type { PdfRect, PdfTextHighlightEvent } from "../types.js";
export interface UsePdfHighlightModeOptions {
	pdfViewerRef: RefObject<PDFViewer | null>;
	document: PDFDocumentProxy | undefined;
	enabled: boolean;
	onTextHighlight?: (event: PdfTextHighlightEvent) => void;
	onHighlightDelete?: (event: PdfTextHighlightEvent) => void;
}
export interface UsePdfHighlightModeResult {
	highlightModeActive: boolean;
	toggleHighlightMode: () => void;
	deleteHighlight: (editorId: string) => void;
}
/**
* Converts an RGB array (0.0–1.0 per channel) to a CSS hex color string.
*/
export declare function rgbArrayToHex(color: number[]): string;
/**
* Converts quadPoints (PDF spec format) back to PdfRect[].
* QuadPoints are 8 values per quad: [x1,y1, x2,y2, x3,y3, x4,y4]
* representing the four corners of each highlight rect.
*
* PDF.js highlight editor produces axis-aligned quads with ordering:
*   (x1,y1)=top-left, (x2,y2)=top-right, (x3,y3)=bottom-left, (x4,y4)=bottom-right
* We derive the bounding rect from x1, y1 (top), x2 (right edge), y3 (bottom).
*/
export declare function quadPointsToRects(quadPoints: Float32Array): PdfRect[];
/**
* Hook that manages the PDF.js built-in highlight annotation editor mode.
* When active, users can select text to create highlights.
* A callback fires with the annotation details for persistence.
*/
export declare function usePdfHighlightMode({ pdfViewerRef, document, enabled, onTextHighlight, onHighlightDelete }: UsePdfHighlightModeOptions): UsePdfHighlightModeResult;
