import type { editor } from 'monaco-editor';
import type { Promisable } from 'type-fest';
/**
 * Type describing monaco editor.
 */
type MonacoEditor = typeof import('monaco-editor');
/**
 * Type describing upload status.
 */
type UploadStatus = 'queued' | 'uploading' | 'paused' | 'completed' | 'failed';
/**
 * Type describing upload item.
 */
export type UploadItem = {
    readonly id: string;
    readonly fileName: string;
    readonly fileSize: number;
    readonly status: UploadStatus;
    readonly progress: number;
    readonly loadedBytes: number;
    readonly totalBytes: number;
    readonly startedAt: number | null;
    readonly completedAt: number | null;
    readonly errorMessage?: string;
};
/**
 * Type describing upload stats.
 */
export type UploadStats = {
    readonly totalFiles: number;
    readonly queuedFiles: number;
    readonly uploadingFiles: number;
    readonly pausedFiles: number;
    readonly failedFiles: number;
    readonly completedFiles: number;
    readonly totalBytes: number;
    readonly uploadedBytes: number;
    readonly progress: number;
    readonly elapsedMs: number;
    readonly speedBytesPerSecond: number;
};
/**
 * Type describing book editor monaco upload progress callback.
 */
type BookEditorMonacoUploadProgressCallback = (progress: number, stats?: {
    loadedBytes: number;
    totalBytes: number;
}) => void;
/**
 * Options for book editor monaco upload.
 */
type BookEditorMonacoUploadOptions = {
    readonly onProgress?: BookEditorMonacoUploadProgressCallback;
    readonly abortSignal?: AbortSignal;
};
/**
 * Type describing book editor monaco on file upload.
 */
type BookEditorMonacoOnFileUpload = (file: File, options?: BookEditorMonacoUploadOptions | BookEditorMonacoUploadProgressCallback) => Promisable<string>;
/**
 * Props for use book editor monaco uploads.
 */
type UseBookEditorMonacoUploadsProps = {
    readonly editor: editor.IStandaloneCodeEditor | null;
    readonly monaco: MonacoEditor | null;
    readonly onFileUpload?: BookEditorMonacoOnFileUpload;
};
/**
 * Handles file uploads and placeholder rendering inside `BookEditorMonaco`.
 *
 * @private function of BookEditorMonaco
 */
export declare function useBookEditorMonacoUploads({ editor, monaco, onFileUpload }: UseBookEditorMonacoUploadsProps): {
    activeUploadItems: UploadItem[];
    uploadItems: UploadItem[];
    uploadStats: UploadStats;
    handleFiles: (files: File[]) => Promise<void>;
    pauseUpload: (uploadId: string) => void;
    resumeUpload: (uploadId: string) => void;
};
export {};
