import { Atom } from '@cn-ui/use';
import { ExFile } from './ExFile';
/** 开发者自定义的 Uploader，只需要进行上传和通知即可 */
export declare type UploadFunc = (notify: UploaderNotify, files: ExFile[], onCancel: (cb: (file: ExFile) => void) => void) => Promise<boolean>;
/** 通知视图更新，如果设置了 sha，只更新sha 值，没有更新，那么全部更新 */
export declare type UploaderNotify = (a: number | Error, sha?: string) => void;
import { UploaderRootProps } from './UploaderRoot';
export declare class UploadController implements Omit<UploaderRootProps, 'children'> {
    uploadState: {
        [sha: string]: Atom<number | Error>;
    };
    constructor(props: UploaderRootProps);
    mode?: 'add' | 'replace';
    multiple: boolean;
    accept?: string;
    limit: number;
    uploading: UploadFunc;
    Files: Atom<ExFile[]>;
    /** 计算 sha 值，并进行缓存 */
    calcSha(file: ExFile): Promise<string>;
    /** 在存储库中加入一个键值对 */
    createSlot(file: ExFile): Promise<Atom<number | Error>>;
    getNotice(sha: string): number | Error;
    addFiles(files: ExFile[]): Promise<false | Atom<number | Error>[]>;
    cancelChannel: import("mitt").Emitter<{
        [k: string]: void;
    }>;
    upload(files: ExFile[]): Promise<boolean>;
    delete(sha: string): void;
    cancel(sha: string): void;
}
