import { UploadItemSize, type UploadItemStatus, type UploadItemType } from '@mezzanine-ui/core/upload'; import { MouseEventHandler } from 'react'; import { IconDefinition } from '@mezzanine-ui/icons'; import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types'; export interface UploadItemProps extends NativeElementPropsWithoutKeyAndRef<'div'> { /** * The file to display. * Required when displaying local files (before upload). * Optional when `url` is provided for already uploaded files. */ file?: File; /** * The URL of the uploaded file. * When provided, this will be used to display files that have already been uploaded to the server. * Useful for loading file lists from the backend. */ url?: string; /** * The id of the file id to identify the file. */ id?: string; /** * The file size to display (optional). */ size?: UploadItemSize; /** * The file size to display (optional). */ fileSize?: number; /** * The type of the item. * @default 'icon' */ type?: UploadItemType; /** * Custom icon for the item. */ icon?: IconDefinition; /** * Whether to show the file size. */ showFileSize?: boolean; /** * Whether the item is disabled. * @default false */ disabled?: boolean; /** * The status of the item. * @default 'loading' */ status: UploadItemStatus; /** * The error message to display when status is 'error'. */ errorMessage?: string; /** * The error icon to display when status is 'error'. */ errorIcon?: IconDefinition; /** * When cancel icon is clicked, this callback will be fired. */ onCancel?: MouseEventHandler; /** * When delete icon is clicked, this callback will be fired. */ onDelete?: MouseEventHandler; /** * When reload icon is clicked, this callback will be fired. */ onReload?: MouseEventHandler; /** * When download icon is clicked, this callback will be fired. */ onDownload?: MouseEventHandler; } /** * The react component for `mezzanine` upload item. */ declare const UploadItem: import("react").ForwardRefExoticComponent>; export default UploadItem;