export type FileUploadEntry<Meta = {
    id: string;
    name: string;
}> = {
    status: 'pending';
    id: string;
    file: File;
} | {
    status: 'uploading';
    id: string;
    file: File;
} | {
    status: 'done';
    id: string;
    file: File;
    meta: Meta;
} | {
    status: 'error';
    id: string;
    file: File;
    error: unknown;
};
export type UseFileUploadStoreOptions<Meta = {
    id: string;
    name: string;
}> = {
    /**
     * Called for each file to perform the actual upload.
     * Should return a promise resolving to file metadata.
     * Not called when `withoutApply` is true.
     */
    upload: (file: File) => Promise<Meta>;
    /** Maximum number of files allowed */
    maxFiles?: number;
    /**
     * When true, files are queued without starting the upload.
     * `onUpload` is called instead so the consumer can drive the upload externally.
     */
    withoutApply?: boolean;
    /** Called with newly added files when `withoutApply` is true */
    onUpload?: (files: File[]) => void;
};
export type UseFileUploadStoreReturn<Meta = {
    id: string;
    name: string;
}> = {
    entries: FileUploadEntry<Meta>[];
    isLoading: boolean;
    addFiles: (files: File[]) => void;
    removeFile: (id: string) => void;
    reset: () => void;
    uploadedMetas: Meta[];
};
/**
 * State machine for managing the file upload lifecycle.
 * The consumer provides an `upload` function — this hook never calls any API directly.
 */
export declare function useFileUploadStore<Meta = {
    id: string;
    name: string;
}>(options: UseFileUploadStoreOptions<Meta>): UseFileUploadStoreReturn<Meta>;
