import type { PDFDocumentProxy } from "pdfjs-dist";
import type { EventBus, PDFViewer } from "pdfjs-dist/web/pdf_viewer.mjs";
import type { RefObject } from "react";
import type { PdfFormFieldValue } from "../types.js";
export interface UsePdfFormFieldsOptions {
	pdfViewerRef: RefObject<PDFViewer | null>;
	eventBusRef: RefObject<EventBus | null>;
	document: PDFDocumentProxy | undefined;
	formData?: Record<string, PdfFormFieldValue>;
	onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;
	onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;
}
export interface UsePdfFormFieldsResult {
	/** Whether the loaded PDF contains interactive form fields. */
	hasFormFields: boolean;
	/** Collect all current form field values and invoke onFormSubmit. */
	submitFormData: () => void;
}
/**
* Hook that manages interactive PDF form fields.
* Builds a field metadata map, pre-populates initial values,
* listens for field changes, and collects values on submit.
*/
export declare function usePdfFormFields({ pdfViewerRef, eventBusRef, document, formData, onFormSubmit, onFormChange }: UsePdfFormFieldsOptions): UsePdfFormFieldsResult;
