import type { EditorHost } from '@blockeditor/lit'; import { type BlobManager, type BlockModel } from '@blockeditor/store'; import type { ImageBlockModel } from '../image-block/image-model.js'; import { AttachmentBlockModel, type AttachmentBlockProps } from './attachment-model.js'; export declare function cloneAttachmentProperties(model: AttachmentBlockModel): AttachmentBlockProps; export declare function getAttachmentBlob(model: AttachmentBlockModel): Promise; /** * Since the size of the attachment may be very large, * the download process may take a long time! */ export declare function downloadAttachmentBlob(editorHost: EditorHost, attachmentModel: AttachmentBlockModel): Promise; /** * Turn the attachment block into an image block. */ export declare function turnIntoImage(model: AttachmentBlockModel): Promise; /** * Turn the image block into a attachment block. */ export declare function turnImageIntoCardView(model: ImageBlockModel, blob: Blob): void; /** * Add a new attachment block before / after the specified block. */ export declare function addSiblingAttachmentBlock(editorHost: EditorHost, file: File, maxFileSize: number, model: BlockModel, place?: 'before' | 'after'): Promise; export declare function setAttachmentLoading(modelId: string, loading: boolean): void; export declare function isAttachmentLoading(modelId: string): boolean; /** * Use it with caution! This function may take a long time! * * @deprecated Use {@link getAttachmentBlob} instead. */ export declare function hasBlob(storage: BlobManager, sourceId: string): Promise; //# sourceMappingURL=utils.d.ts.map