import { type FileSource, type IFileWithPath } from "@leight/file"; import { type IHrefProps } from "@leight/utils"; import { type IOnFinishProps, type IUseChunkProps } from "@leight/utils-client"; export interface IUseUploadProps extends Pick { chunkHref?: IHrefProps; commitHref?: IHrefProps; file: IFileWithPath; path: string; replace?: boolean; onFinish?(props: IOnFinishProps & { file: FileSource["Type"]["Entity"]; }): Promise; } export declare const useUpload: ({ file, path, chunkHref, commitHref, onStart, onFinish, onError, replace, }: IUseUploadProps) => { readonly isRunning: boolean; readonly isDone: boolean; readonly isError: boolean; readonly isSuccess?: boolean | undefined; readonly current: number; readonly total: number; progress(): void; start(total: number): void; finish(withError?: boolean | undefined): void; error(error?: boolean | undefined): void; percent(): number; }; //# sourceMappingURL=useUpload.d.ts.map