import { type DragEvent, type ClipboardEvent } from 'react'; import { type ChatDraftAttachment } from '../stores/chatDraftStore'; export type FileAttachmentType = 'image' | 'pdf' | 'text' | 'binary'; export type FileUploadStatus = 'uploading' | 'ready' | 'failed'; export interface UploadedAttachment { id: string; filename: string; mimeType: string; size: number; sha256: string; kind: FileAttachmentType; originalPath: string; originalUrl: string; metadataUrl: string; status: 'ready'; } export interface FileAttachment { id: string; file: File; type: FileAttachmentType; name: string; preview?: string; data?: string; mediaType: string; textContent?: string; uploadStatus: FileUploadStatus; uploadedAttachment?: UploadedAttachment; uploadError?: string; } export declare const DEFAULT_MAX_FILE_SIZE_MB = 5; export declare const DEFAULT_MAX_TOTAL_SIZE_MB = 20; export type StagedFileValidation = { ok: true; } | { ok: false; reason: 'file' | 'total'; message: string; }; export declare function validateStagedFile(file: File, stagedBytes: number, options: { maxSizeMB: number; maxTotalSizeMB: number; }): StagedFileValidation; interface UseFileUploadOptions { maxFiles?: number; maxSizeMB?: number; maxTotalSizeMB?: number; pageWide?: boolean; supportsImages?: boolean; supportsFileAttachments?: boolean; sessionId?: string; draftKey?: string; onError?: (message: string) => void; } export declare function useFileUpload(options?: UseFileUploadOptions): { files: FileAttachment[]; images: FileAttachment[]; documents: FileAttachment[]; isDragging: boolean; error: string; addFiles: (inputFiles: FileList | File[]) => Promise; restoreFiles: (attachments: ChatDraftAttachment[]) => void; removeFile: (id: string) => void; clearFiles: () => void; handleDragEnter: (e: DragEvent) => void; handleDragLeave: (e: DragEvent) => void; handleDragOver: (e: DragEvent) => void; handleDrop: (e: DragEvent) => void; handlePaste: (e: ClipboardEvent) => void; }; export {}; //# sourceMappingURL=useFileUpload.d.ts.map