import type { Ref } from 'react'; import type { ForwardRefForwardPropsComponent, BaseProps } from '../../types'; import type { FileVisualProps } from './FileVisual'; export interface FileItemProps extends BaseProps { /** Unique id for item. */ id: string; /** Name of the file. */ name: string; /** A string to be used as an image src for a attachment thumbnail. Falls back to a provided icon or the default attachment icon. */ thumbnail?: FileVisualProps['thumbnail']; /** File extension. Use 'url' for link */ format?: string; /** * Used for a smaller sized FileItem. * @default false */ compact?: boolean; /** When passed, will render a single icon button for yet to be or in progress uploads. Use this action to trigger xhr request termination. */ onCancel?: (id: FileItemProps['id']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onEdit?: (id: FileItemProps['id']) => void; /** When passed, the file name will be rendered as a clickable button. Fires on direct click of the name. Passes file id as the parameter. */ onPreview?: (id: FileItemProps['id']) => void; /** When passed, will render a preview tooltip. Will be fired on click of preview tooltip. Passes file id as the parameter. */ onPreviewPopoverClick?: (id: FileItemProps['id']) => void; /** * Moves preview option to actions menu. * To be used only in compact mode of single file input when rendered in a table */ previewFromActions?: boolean; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. Passes file id as the parameter. */ onDownload?: (id: FileItemProps['id']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onDelete?: (id: FileItemProps['id']) => void; /** When passed, will render a single icon button or within a MenuButton if other actions are defined. */ onOpen?: (id: FileItemProps['id']) => void; /** If the attachment is in an upload state, pass progress as a number between 0-100 representing the percentage of progress. */ progress?: number; /** Set if there is an error uploading the file. Applies error styling to the meta string passed. */ error?: string; /** Setting the disable state */ disabled?: boolean; /** Ref for the wrapping element. */ ref?: Ref; } export declare const StyledPreviewTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit & import("react").RefAttributes & import("../../types").ForwardProps, "ref"> & { ref?: ((instance: HTMLAnchorElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject | null | undefined; }, never>> & string & Omit, keyof import("react").Component>; export declare const StyledTextTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit & import("react").RefAttributes & import("../../types").ForwardProps, "ref"> & { ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject | null | undefined; }, never>> & string & Omit, keyof import("react").Component>; export declare const StyledFileItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute, HTMLDivElement>, { compactMode: FileItemProps["compact"]; isDisabled?: FileItemProps["disabled"]; }>> & string; declare const FileItem: ForwardRefForwardPropsComponent; export default FileItem; //# sourceMappingURL=FileItem.d.ts.map