import { TUseValues } from '../../AHooks/useValues';
import { IABaseProps } from '../ABase/ABase';
import { Resources } from '../AResource/AResource';
import { IAWrapProps } from '../AWrap/AWrap';
import { TIdx } from '../ATypes/ATypes';
export type TFileUploaderMode = 'Upload' | 'Download' | 'View';
export type TFileUploaderType = 'Primary' | 'Secondary';
export type TFileStatus = 'Normal' | 'Error' | 'Loading' | 'Pending' | 'Deleted';
export type TFileAction = 'upload' | 'download' | 'downloadAll';
export interface ExtendedFile extends File {
    /**
     * File 인스턴스 외에, 이미 업로드된 파일을 메타데이터(이름/사이즈/인덱스/URL)만으로 표현하기 위한 확장 필드들
     * - idx: 서버에서 부여한 파일 식별자
     * - url: 이미 업로드된 파일 접근용 URL
     *
     * name, size 는 File 타입에 이미 존재하는 필드를 그대로 사용합니다.
     */
    idx?: TIdx;
    state?: number;
    status?: TFileStatus;
    uniqueId?: string;
    url?: string;
}
export interface IFileActionParams<TFile extends ExtendedFile = ExtendedFile> {
    action: TFileAction;
    file?: TFile;
    files: TFile[];
}
export interface IAFileUploaderProps<TFile extends ExtendedFile = ExtendedFile> extends IAWrapProps, IABaseProps {
    FileAddonRenderer?: (file: TFile) => React.ReactNode;
    accept?: string;
    csvFilename?: string;
    hideFileSize?: boolean;
    isFlaggedFile?: (file: TFile) => boolean;
    limit?: number;
    maxFileCount?: number;
    mode: TFileUploaderMode;
    onDelete?: (file: TFile, updateStatus: (status: TFileStatus) => void) => Promise<void> | void;
    onDownload?: (file: TFile, updateStatus: (status: TFileStatus, progress?: number) => void) => void;
    onDownloadAll?: (files: TFile[], updateAllStatus: (statuses: Record<string, TFileStatus>, progress?: Record<string, number>) => void) => void;
    onDownloadCsv?: (files: TFile[]) => void;
    onFlaggedFileAction?: (params: IFileActionParams<TFile>) => Promise<boolean> | boolean;
    onInvalidFileFormat?: () => void;
    onUpload?: (file: TFile, updateStatus: (status: TFileStatus, progress?: number) => void) => Promise<void> | void;
    resources?: Partial<typeof Resources.AFileUploader>;
    type?: TFileUploaderType;
    useError?: TUseValues<boolean>;
    useFiles: TUseValues<TFile[] | undefined>;
}
export type TFileChipButtonType = 'upload' | 'pending' | 'loading' | 'error' | 'deleted' | 'download' | 'view';
export declare const AFileUploader: <TFile extends ExtendedFile = ExtendedFile>(props: IAFileUploaderProps<TFile>) => import("react/jsx-runtime").JSX.Element | null;
