import { t as CameraStream } from "./camera-9wWD-pwg.js"; import { t as PermissionResult } from "./types-BEwVKkLJ.js"; //#region src/modules/document-capture/types.d.ts type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement' | 'processW8BenOcr' | 'processW8BenEOcr' | 'w8Ben' | 'w8BenE'; declare const DOCUMENT_CAPTURE_ERROR_CODES: { readonly FILE_TOO_LARGE: "FILE_TOO_LARGE"; readonly UPLOAD_FAILED: "UPLOAD_FAILED"; }; declare const DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES: { readonly UNEXPECTED_ERROR: "UNEXPECTED_ERROR"; }; type DocumentCaptureErrorCode = (typeof DOCUMENT_CAPTURE_ERROR_CODES)[keyof typeof DOCUMENT_CAPTURE_ERROR_CODES]; type DocumentCaptureFinalizeErrorCode = (typeof DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES)[keyof typeof DOCUMENT_CAPTURE_FINALIZE_ERROR_CODES]; /** * Configuration for the document capture module. * Parameterized to support both DOCUMENT_CAPTURE and ADDRESS flows. */ type DocumentCaptureConfig = { /** Processing type for API endpoint routing. @default 'addressStatement' */ processingType?: DocumentType; /** * Restricts the capture method, selecting the Figma "3 cases" flow: * - `'camera'` → capture only (upload hidden) * - `'file'` → upload only (camera hidden) * - absent → capture + upload (method selection) — the default */ captureMode?: 'file' | 'camera'; /** Allow user to skip this step. @default false */ allowSkipDocumentCapture?: boolean; /** Backend ADDRESS config field. Inverted: `disableSkipPoa: true` → skip disabled. If both are set, `allowSkipDocumentCapture` takes precedence. */ disableSkipPoa?: boolean; /** Tutorial screen title override */ title?: string; /** Tutorial screen text override */ text?: string; /** Title override for the second-page tutorial (multi-page flows). Falls back to `title`. */ step2Title?: string; /** Text override for the second-page tutorial (multi-page flows). Falls back to `text`. */ step2Text?: string; /** Number of capture/upload attempts before auto-advancing. @default 3 */ captureAttempts?: number; /** Send image as base64 instead of raw file. @default false */ sendBase64?: boolean; /** Maximum file size in bytes. @default 10485760 (10MB) */ maxFileSize?: number; /** Restrict uploads to PDF files only (camera capture is unaffected). @default false */ onlyPdf?: boolean; }; type CapturedDocument = { imageBase64: string; file: File; fileType: string; }; type DocumentUploadResponse = { success: boolean; status?: 'ADD_NEXT_PAGE' | 'OPTIONAL_PAGE_CAPTURE' | 'SUCCESS'; }; type FinalizeDocumentResponse = { status?: string; success?: boolean; }; type DocumentCaptureResolvedConfig = { processingType: DocumentType; /** Resolved: restrict to camera capture only (upload hidden). */ onlyCapture: boolean; /** Resolved: restrict to file / photo-library upload only (camera hidden). */ onlyUpload: boolean; allowSkipDocumentCapture: boolean; captureAttempts: number; sendBase64: boolean; maxFileSize: number; /** Resolved: restrict uploads to PDF files only. */ onlyPdf: boolean; title: string | undefined; text: string | undefined; step2Title: string | undefined; step2Text: string | undefined; }; type DocumentCaptureNextPageType = 'none' | 'required' | 'optional'; type DocumentCaptureContext = { config: DocumentCaptureResolvedConfig; stream: CameraStream | undefined; permissionResult: PermissionResult | 'refresh' | undefined; capturedDocument: CapturedDocument | undefined; captureMethod: 'camera' | 'file' | 'gallery' | undefined; /** * Whether the capture-method selection surface (bottom sheet on mobile web, * modal on desktop, upload-only selector) is open. Modeled in context — not * as a discrete state — so the analytics mapper can name the selector screen * while the machine stays in `tutorial`. */ methodSelectionOpen: boolean; /** Whether the "common issues" help overlay is open over the camera view. */ helpOpen: boolean; progress: number; error: DocumentCaptureErrorCode | DocumentCaptureFinalizeErrorCode | undefined; attemptsRemaining: number; pageNumber: number; nextPageType: DocumentCaptureNextPageType; }; type DocumentCaptureInput = { config: DocumentCaptureConfig; }; //#endregion export { DocumentCaptureErrorCode as a, DocumentType as c, DocumentCaptureContext as i, DocumentUploadResponse as l, DOCUMENT_CAPTURE_ERROR_CODES as n, DocumentCaptureInput as o, DocumentCaptureConfig as r, DocumentCaptureNextPageType as s, CapturedDocument as t, FinalizeDocumentResponse as u };