import { WasmFrameData } from '@scandit/web-datacapture-core/build/js/worker/dataCaptureWorkerRelated';
import { ImageBuffer } from './sdcCoreInternalSdkCommonGeometry.js';
import { Direction } from './sdcCoreCommon.js';
import { Quadrilateral, Rect } from './sdcCoreCommonGeometry.js';
import './sdcCoreCommonGraphic.js';

interface TextRecognizerSettings {
    minimumLineHeight: number;
    maximumLineHeight: number;
    combineCapturedTextsIntoSingleResult: boolean;
}
interface ExternalOcrBackend {
    getName(): string;
    onBeforeNextFrame(frameData: WasmFrameData): void;
    getLastErrorMessage(): string;
    getLastResults(): Array<ExternalOcrBackendResult>;
    getSpecificData(key: string): string;
    setRecognitionArea(roi: Rect, direction: Direction): void;
    processFrame(imageBuffer: ImageBuffer): boolean;
    updateSettings(settings: TextRecognizerSettings): void;
}
interface ExternalOcrBackendHelper {
}
interface ExternalOcrBackendHelper_statics {
    adjustRoi(roi: Rect, margin: number): Rect;
}
interface ExternalOcrBackendResult {
    value: string;
    location: Quadrilateral;
}
interface SdcCoreInternalSdkOcr_statics {
    ExternalOcrBackendHelper: ExternalOcrBackendHelper_statics;
}

export type { ExternalOcrBackend, ExternalOcrBackendHelper, ExternalOcrBackendHelper_statics, ExternalOcrBackendResult, SdcCoreInternalSdkOcr_statics, TextRecognizerSettings };
