import { DropItem, FileTriggerProps } from 'react-aria-components'; import { ButtonProps } from '../../action/Button'; export declare const fileUploaderVariants: (props?: ({ withButtons?: boolean | null | undefined; } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string; export type Size = 'm' | 'l'; /** * Upload function that handles the actual file upload. * @param file - The file to upload * @param onProgress - Optional callback to report upload progress (0-100) * @returns Promise that resolves with upload result or rejects with error */ export type UploadFunction = (file: File, onProgress?: (progress: number) => void) => Promise; /** * Delete function that handles the actual file deletion. * @param fileUpload - The file upload object to delete * @returns Promise that resolves when deletion is successful or rejects with error */ export type DeleteFunction = (fileUpload: FileUpload) => Promise; export type FileListLayout = 'list' | 'grid' | 'preview'; export type FileUploaderProps = FileTriggerProps & { secondaryButtonProps?: ButtonProps; /** * Callback function that handles the actual file upload. * If not provided, files will only be processed locally (legacy behavior). */ uploadFunction?: UploadFunction; /** * Callback function that handles the actual file deletion. * If not provided, files will only be removed from local state. */ deleteFunction?: DeleteFunction; /** Called when a file upload succeeds */ onUpload?: (file: File) => void; /** Called when a file upload fails */ onError?: (file: File) => void; /** Called when a file is successfully deleted */ onDelete?: (file: File) => void; /** Called when a file deletion fails */ onDeleteError?: (file: File) => void; /** Called whenever the upload state changes */ onChange?: (files: FileUpload[]) => void; maxSize?: number; acceptedFileTypes?: string[]; acceptedFileTypesMessage?: string; /** Layout type for displaying the file list */ layout?: FileListLayout; }; export type FileUpload = { uuid: string; file: File; progress: number; data: string | ArrayBuffer | null; error: boolean; /** Indicates if the file is currently being uploaded */ isUploading?: boolean; /** Indicates if the file is currently being deleted */ isDeleting?: boolean; /** Indicates if there was an error during deletion */ hasDeleteError?: boolean; /** Result from the upload function when successful */ result?: unknown; }; export type DropEvent = { items: DropItem[]; }; //# sourceMappingURL=types.d.ts.map