import { ReactNode } from '../../../node_modules/react';
import { FileTypeIconExtension } from '../FileTypeIcon';
export type UploadFileStatus = 'uploading' | 'complete' | 'failed';
export interface UploadFile {
/** Stable identifier used for remove/retry callbacks and list keys. */
id: string;
name: string;
/** File size in bytes; formatted automatically (e.g. "167 B"). */
size?: number;
status: UploadFileStatus;
/** 0-100. Only shown while `status === 'uploading'`. */
progress?: number;
/** Extra text segments rendered before the status (e.g. `["313 Records"]`). */
metaItems?: string[];
/** Shown only when `status === 'failed'`, above the "Try Again" link. */
errorMessage?: string;
/** Drives the `FileTypeIcon` glyph; inferred from `name`'s extension if omitted. */
fileType?: FileTypeIconExtension;
}
export interface FileUploaderProps {
/**
* Allow selecting/dropping more than one file at a time. When `false`,
* the dropzone hides itself once `files` has one entry.
* @default false
*/
multiple?: boolean;
/** Passed to the hidden `` and used to filter dropped files (e.g. `".csv"`, `"image/*"`). */
accept?: string;
/** Caps how many files `files` may hold when `multiple` is set; the dropzone hides once reached. */
maxFiles?: number;
/** The controlled list of files and their upload state. */
files?: UploadFile[];
/** Fired with the raw, `accept`-filtered `File[]` picked via browse or drop. */
onFilesAdded?: (files: File[]) => void;
onRemoveFile?: (id: string) => void;
onRetryFile?: (id: string) => void;
/** @default 'Drag & Drop or' */
title?: string;
/** The clickable trailing word/phrase. @default 'Browse' */
browseLabel?: string;
/** @default 'Upload a file to begin' */
subtitle?: string;
/** Overrides the default upload glyph, e.g. ``. */
illustration?: ReactNode;
disabled?: boolean;
className?: string;
}
export declare const FileUploader: import('../../../node_modules/react').ForwardRefExoticComponent>;