export interface AttachmentReject { file: File; reason: 'type' | 'size' | 'count'; } /** One attached file plus a stable generated id (two files may share a name). */ export interface ComposerAttachment { id: string; file: File; } export interface UseAttachmentsOptions { accept?: string | undefined; maxFiles?: number | undefined; maxFileSize?: number | undefined; onAttachmentReject?: ((rej: AttachmentReject) => void) | undefined; /** Files attached on mount (e.g. a restored draft); not validated. */ initialFiles?: readonly File[] | undefined; } /** * REQ-SURF-118: attachment list for Composer.Root. Accept/reject is decided * outside the state updater (from a ref mirroring the committed list), so the * reject callback and the announcement fire exactly once per file even when * React replays updaters (StrictMode, concurrent rendering). */ export declare function useAttachments({ accept, maxFiles, maxFileSize, onAttachmentReject, initialFiles }?: UseAttachmentsOptions): { items: ComposerAttachment[]; files: File[]; add: (incoming: File[] | FileList, _source: "picker" | "paste" | "drop") => void; remove: (id: string) => void; clear: () => void; }; //# sourceMappingURL=useAttachments.d.ts.map