{"version":3,"file":"useRetryAttachmentUpload.mjs","names":[],"sources":["../../../../../src/components/MessageComposer/AttachmentPreviewList/useRetryAttachmentUpload.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport type { LocalUploadAttachment } from 'stream-chat';\nimport { useMessageComposerController } from '../hooks';\nimport { uploadAttachmentIfEnabled } from '../uploadAttachmentIfEnabled';\n\n/** Returns a handler that retries a failed attachment upload in place. */\nexport const useRetryAttachmentUpload = () => {\n  const { attachmentManager } = useMessageComposerController();\n\n  return useCallback(\n    (attachment: LocalUploadAttachment) =>\n      uploadAttachmentIfEnabled(attachmentManager, attachment),\n    [attachmentManager],\n  );\n};\n"],"mappings":";;;;;AAMA,IAAa,iCAAiC;CAC5C,MAAM,EAAE,sBAAsB,6BAA6B;CAE3D,OAAO,aACJ,eACC,0BAA0B,mBAAmB,UAAU,GACzD,CAAC,iBAAiB,CACpB;AACF"}