import * as React from 'react'; interface FileWithPath extends File { readonly path?: string; readonly handle?: FileSystemFileHandle; readonly relativePath?: string; } declare function useDropzone(options?: DropzoneOptions): DropzoneState; declare enum ErrorCode { FileInvalidType = "file-invalid-type", FileTooLarge = "file-too-large", FileTooSmall = "file-too-small", TooManyFiles = "too-many-files", } interface FileError { message: string; code: ErrorCode | string; } interface FileRejection { file: FileWithPath; errors: readonly FileError[]; } type DropzoneOptions = Pick, PropTypes> & { accept?: Accept; minSize?: number; maxSize?: number; maxFiles?: number; preventDropOnDocument?: boolean; noClick?: boolean; noKeyboard?: boolean; noDrag?: boolean; noDragEventsBubbling?: boolean; disabled?: boolean; onDrop?: ( acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent ) => void; onDropAccepted?: (files: T[], event: DropEvent) => void; onDropRejected?: (fileRejections: FileRejection[], event: DropEvent) => void; getFilesFromEvent?: ( event: DropEvent ) => Promise>; onFileDialogCancel?: () => void; onFileDialogOpen?: () => void; onError?: (err: Error) => void; validator?: ( file: T ) => FileError | readonly FileError[] | null; useFsAccessApi?: boolean; autoFocus?: boolean; }; type DropEvent = | React.DragEvent | React.ChangeEvent | DragEvent | Event | Array; type DropzoneState = DropzoneRef & { isFocused: boolean; isDragActive: boolean; isDragAccept: boolean; isDragReject: boolean; isFileDialogActive: boolean; acceptedFiles: readonly FileWithPath[]; fileRejections: readonly FileRejection[]; rootRef: React.RefObject; inputRef: React.RefObject; getRootProps: (props?: T) => T; getInputProps: (props?: T) => T; }; interface DropzoneRef { open: () => void; } interface DropzoneRootProps extends React.HTMLAttributes { refKey?: string; [key: string]: any; } interface DropzoneInputProps extends React.InputHTMLAttributes { refKey?: string; } type PropTypes = "multiple" | "onDragEnter" | "onDragOver" | "onDragLeave"; interface Accept { [key: string]: readonly string[]; } export { useDropzone }; export type { DropzoneOptions };