{"version":3,"file":"uploadAttachmentIfEnabled.mjs","names":[],"sources":["../../../../src/components/MessageComposer/uploadAttachmentIfEnabled.ts"],"sourcesContent":["import type { AttachmentManager, LocalUploadAttachment } from 'stream-chat';\n\n/**\n * Uploads `attachment` in place through `attachmentManager.uploadFile()`, which runs the upload\n * middleware. Does nothing while the composer accepts no uploads (`AttachmentManager.isUploadEnabled`).\n */\nexport const uploadAttachmentIfEnabled = (\n  attachmentManager: AttachmentManager,\n  attachment: LocalUploadAttachment,\n) =>\n  attachmentManager.isUploadEnabled\n    ? attachmentManager.uploadFile(attachment)\n    : undefined;\n"],"mappings":";;;;;AAMA,IAAa,6BACX,mBACA,eAEA,kBAAkB,kBACd,kBAAkB,WAAW,UAAU,IACvC,KAAA"}