import { fabric } from 'fabric'; import { Region } from '../../types'; interface UseOCRRecognitionParams { ocrRecognize?: (image: string) => Promise>; onChange?: (labels: Region[]) => void; updateTextLayers: (rect: fabric.Rect, region: Region) => void; canvas: fabric.Canvas | undefined; rectMapRef: React.MutableRefObject>; textLayersMapRef: React.MutableRefObject>; textLayoutContentMapRef: React.MutableRefObject>; } /** * Hook for managing OCR recognition logic * @param params - OCR recognition configuration parameters * @returns performOCRIfNeeded function and ocrRecognizingRef */ export declare const useOCRRecognition: ({ ocrRecognize, onChange, updateTextLayers, canvas, rectMapRef, textLayersMapRef, textLayoutContentMapRef, }: UseOCRRecognitionParams) => { performOCRIfNeeded: (region: Region, action: "create" | "update") => Promise; performOCR: (region: Region) => Promise; ocrRecognizingRef: import('react').RefObject>; ocrErrorRef: import('react').RefObject>; }; export {};