import { UploadFile, UploadChangeParam, UploadProps } from '@aplus-frontend/antdv';
import { accessCreate } from '@aplus-frontend/oss';
import { VNodeChild } from 'vue';
export type ApUploadGetOssAccess = (bucket?: string) => Promise<accessCreate>;
type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
export type ApUploadFile<T = any> = UploadFile<T> & {
    ossDestroy?: () => any;
    [key: string | number | symbol]: any;
};
export type ApUploadCustomRequest = (option: Omit<Parameters<Exclude<UploadProps['customRequest'], undefined>>[0], 'file'> & {
    file?: ApUploadFile;
}, props?: {
    dirName?: string;
    bucket?: string;
}) => void;
export type ApUploadBaseProps<T = any> = {
    dirName: string;
    getOssAccess?: ApUploadGetOssAccess;
    fileList?: ApUploadFile<T>[];
    onChange?: (info?: UploadChangeParam<ApUploadFile<T>>) => void;
    maxSize?: number;
    accept?: string;
    beforeUpload?: (file: ApUploadFile<T>, fileList: ApUploadFile<T>[]) => boolean | Promise<boolean>;
    customRequest?: ApUploadCustomRequest;
    maxSizeErrorMsg?: string;
    acceptErrorMsg?: string;
    bucket?: string;
};
export type ApUploadSingleProps<T = any> = ApUploadBaseProps<T> & {
    title?: VNodeChild;
    subTitle?: VNodeChild;
};
export {};
