import { HTMLAttributes, default as React } from 'react'; import { FileUploadErrorType } from '../FileUploadStatus/FileUploadStatus'; export interface FileUploadCardProps extends Omit, 'onDrop'> { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string; /** * Controls whether the component is visible. */ isOpen: boolean; /** * Callback function when the component should be closed. */ onDismiss?: () => void; /** * Callback function when a file is selected. */ onFileSelect?: (files: File[]) => void; /** * Callback function when download template is clicked. */ onDownloadTemplate?: () => void; /** * Callback function when search button is clicked after file upload. */ onSearch?: (file: File) => void; /** * Accepted file types. * @default '.csv' */ accept?: string; /** * Allow multiple file selection. * @default false */ multiple?: boolean; /** * Card title (e.g. from CMS). */ title: string; /** * Aria-label for the file input (e.g. from CMS). */ fileInputAriaLabel: string; /** * Aria-label for the dropzone region (e.g. from CMS). */ dropzoneAriaLabel: string; /** * Dropzone title text (e.g. from CMS). */ dropzoneTitle: string; /** * Label for the select file button (e.g. from CMS). */ selectFileButtonLabel: string; /** * Label for the download template button (e.g. from CMS). */ downloadTemplateButtonLabel: string; /** * Aria-label for the remove button in FileUploadStatus (e.g. from CMS). */ removeButtonAriaLabel: string; /** * Label for the search button in FileUploadStatus (e.g. from CMS). */ searchButtonLabel: string; /** * Status text when uploading in FileUploadStatus (e.g. from CMS). */ uploadingStatusText: string; /** * Status text when processing/polling in FileUploadStatus (e.g. from CMS). * @default 'Importing...' */ processingStatusText?: string; /** * Status text when completed in FileUploadStatus (e.g. from CMS). Receives file size in bytes. */ getCompletedStatusText: (fileSize: number) => string; /** * Error messages per error type for FileUploadStatus (e.g. from CMS). */ errorMessages: Partial>; /** * Formatter for file size display. */ formatterFileSize?: (size: number) => string; /** * Formatter for file name display. */ formatterFileName?: (name: string) => string; /** * Indicates if the file is being uploaded. */ isUploading?: boolean; /** * Indicates if the OES operation is polling/processing after upload. */ isProcessing?: boolean; /** * Indicates if there was an error during file upload. */ hasError?: boolean; /** * Type of error when hasError is true. */ errorType?: FileUploadErrorType; /** * Custom error message to display when hasError is true. */ errorMessage?: string; } declare const FileUploadCard: ({ testId, isOpen, onDismiss, onFileSelect, onDownloadTemplate, onSearch, accept, multiple, title, fileInputAriaLabel, dropzoneAriaLabel, dropzoneTitle, selectFileButtonLabel, downloadTemplateButtonLabel, removeButtonAriaLabel, searchButtonLabel, uploadingStatusText, processingStatusText, getCompletedStatusText, errorMessages, formatterFileSize, formatterFileName, isUploading, isProcessing, hasError, errorType: errorTypeProp, errorMessage, ...otherProps }: FileUploadCardProps) => React.JSX.Element; export default FileUploadCard; //# sourceMappingURL=FileUploadCard.d.ts.map