import * as react from 'react'; /** * Aggregate outcome of a receipt batch after the backend finishes OCR and * auto-matching. `stillProcessing` counts receipts that never reached a terminal * state inside the host's budget, which is a neutral state, not a failure. */ interface ReceiptMatchSummary { total: number; matched: number; unmatched: number; unreadable: number; stillProcessing: number; } interface UploadReceiptWidgetProps { emailAddress: string; onFileUpload?: (file: File) => unknown | Promise; /** * Awaited after every file in the batch has uploaded. Resolve once the backend * has finished OCR and auto-matching so the widget can report the outcome in * its batch toast. Omit it and the widget stops at "Uploaded N attachments". */ onAwaitMatching?: (uploadedCount: number) => Promise; isUploading?: boolean; } declare function UploadReceiptWidget({ emailAddress, onFileUpload, onAwaitMatching, isUploading, }: UploadReceiptWidgetProps): react.JSX.Element; export { UploadReceiptWidget }; export type { ReceiptMatchSummary, UploadReceiptWidgetProps };