import type { SendContent } from '@conciv/protocol/chat-message-types'; type ContentParts = Exclude; export type AttachmentContentPart = ContentParts[number]; export type PendingAttachmentStatus = { type: 'running'; reason: 'uploading'; progress: number; } | { type: 'requires-action'; reason: 'composer-send'; } | { type: 'incomplete'; reason: 'error' | 'upload-paused'; message?: string; }; export type CompleteAttachmentStatus = { type: 'complete'; }; export type BaseAttachment = { id: string; type: 'image' | 'document' | 'file' | (string & {}); name: string; contentType?: string; }; export type PendingAttachment = BaseAttachment & { file: File; status: PendingAttachmentStatus; }; export type CompleteAttachment = BaseAttachment & { file?: File; content: AttachmentContentPart[]; status: CompleteAttachmentStatus; }; export type Attachment = PendingAttachment | CompleteAttachment; export type AttachmentAdapter = { accept: string; add: (state: { file: File; }) => Promise | AsyncGenerator; remove: (attachment: Attachment) => Promise; send: (attachment: PendingAttachment) => Promise; }; export declare function attachmentId(): string; export declare function fileToDataSource(file: File): Promise<{ type: 'data'; value: string; mimeType: string; }>; export declare function fileMatchesAccept(file: Pick, accept: string): boolean; export declare function createSimpleImageAttachmentAdapter(): AttachmentAdapter; export declare function isCompleteAttachment(attachment: Attachment): attachment is CompleteAttachment; export declare function createTextAttachmentAdapter(): AttachmentAdapter; export declare function composeAttachmentAdapters(adapters: readonly AttachmentAdapter[]): AttachmentAdapter; export {}; //# sourceMappingURL=attachment-adapter.d.ts.map