{"version":3,"file":"AttachmentContainer.mjs","names":[],"sources":["../../../../src/components/Attachment/AttachmentContainer.tsx"],"sourcesContent":["import React, {\n  type PropsWithChildren,\n  useLayoutEffect,\n  useMemo,\n  useRef,\n  useState,\n} from 'react';\nimport clsx from 'clsx';\nimport type {\n  Attachment,\n  LocalAttachment,\n  SharedLocationResponseData,\n  VideoAttachment as VideoAttachmentType,\n} from 'stream-chat';\nimport {\n  getAttachmentPreviewUrl,\n  isAudioAttachment,\n  isFileAttachment,\n  isPendingUpload,\n  isSharedLocationResponseData,\n  isVideoAttachment,\n  isVoiceRecordingAttachment,\n} from 'stream-chat';\n\nimport { Audio as DefaultAudioAttachment } from './Audio';\nimport { AttachmentActions as DefaultAttachmentActions } from './AttachmentActions';\nimport { VoiceRecording as DefaultVoiceRecording } from './VoiceRecording';\nimport { type GalleryItem, toGalleryItemDescriptors } from '../Gallery';\nimport { ImageComponent as DefaultImage } from './Image';\nimport { Card as DefaultCard } from './LinkPreview/Card';\nimport { FileAttachment as DefaultFile } from './FileAttachment';\nimport { Giphy as DefaultGiphy } from './Giphy';\nimport { Geolocation as DefaultGeolocation } from './Geolocation';\nimport { ModalGallery as DefaultModalGallery } from './ModalGallery';\nimport { UnsupportedAttachment as DefaultUnsupportedAttachment } from './UnsupportedAttachment';\nimport {\n  type AttachmentComponentType,\n  type GalleryAttachment,\n  type GeolocationContainerProps,\n  getCssDimensionsVariables,\n  isGalleryAttachmentType,\n  isSvgAttachment,\n  type RenderAttachmentProps,\n  type RenderGalleryProps,\n  type RenderMediaProps,\n  SUPPORTED_VIDEO_FORMATS,\n} from './utils';\nimport { VisibilityDisclaimer } from './VisibilityDisclaimer';\nimport { VideoAttachment } from './VideoAttachment';\nimport type { AttachmentProps } from './Attachment';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport {\n  type ImageAttachmentConfiguration,\n  useAttachmentContext,\n} from '../../context/AttachmentContext';\nimport { AttachmentUploadProgressIndicator as DefaultAttachmentUploadProgressIndicator } from './components';\n\n/**\n * Whether there is anything to render the attachment from: a CDN URL, or the local file while\n * its upload is in flight or after it failed (a failed message can be retried, so the user has\n * to see it). Reads the payload only: `UploadManager` drops its record a microtask before the\n * resolved URL is written back, so gating on the live record would blink the attachment out.\n */\nconst hasRenderableSource = (attachment: Attachment | LocalAttachment) =>\n  isPendingUpload(attachment) ||\n  !!getAttachmentPreviewUrl(attachment, attachment.asset_url);\n\nexport type AttachmentContainerProps = {\n  attachment: Attachment | GalleryAttachment | SharedLocationResponseData;\n  componentType: AttachmentComponentType;\n};\nexport const AttachmentWithinContainer = ({\n  attachment,\n  children,\n  componentType,\n}: PropsWithChildren<AttachmentContainerProps>) => {\n  let extra = '';\n  let isSvg = false;\n\n  if (!isSharedLocationResponseData(attachment)) {\n    const isGAT = isGalleryAttachmentType(attachment);\n    if (!isGAT) {\n      extra =\n        componentType === 'card' && !attachment?.image_url && !attachment?.thumb_url\n          ? 'no-image'\n          : attachment?.actions?.length\n            ? 'actions'\n            : '';\n      isSvg = isSvgAttachment(attachment);\n    }\n  }\n\n  const classNames = clsx(\n    'str-chat__message-attachment str-chat__message-attachment-dynamic-size',\n    {\n      [`str-chat__message-attachment--${componentType}`]: componentType,\n      [`str-chat__message-attachment--${(attachment as Attachment)?.type}`]: (\n        attachment as Attachment\n      )?.type,\n      [`str-chat__message-attachment--${componentType}--${extra}`]:\n        componentType && extra,\n      'str-chat__message-attachment--svg-image': isSvg,\n      'str-chat__message-attachment-with-actions': extra === 'actions',\n    },\n  );\n\n  return <div className={classNames}>{children}</div>;\n};\n\nexport const AttachmentActionsContainer = ({\n  actionHandler,\n  attachment,\n  AttachmentActions = DefaultAttachmentActions,\n  attachmentActionsDefaultFocus,\n}: RenderAttachmentProps) => {\n  if (!attachment.actions?.length) return null;\n\n  const defaultFocusedActionValue =\n    attachment.type && attachmentActionsDefaultFocus?.[attachment.type];\n\n  return (\n    <AttachmentActions\n      {...attachment}\n      actionHandler={actionHandler}\n      actions={attachment.actions}\n      defaultFocusedActionValue={defaultFocusedActionValue}\n      id={(attachment as LocalAttachment).localMetadata?.id || ''}\n      text={attachment.text || ''}\n    />\n  );\n};\n\nexport const MediaContainer = (props: RenderMediaProps) => {\n  const { attachments: mediaAttachments } = props;\n  if (!mediaAttachments.length) return null;\n\n  if (mediaAttachments.length > 1) {\n    return (\n      <GalleryContainer\n        {...props}\n        attachment={{ items: mediaAttachments, type: 'gallery' }}\n      />\n    );\n  }\n\n  const mediaAttachment = mediaAttachments[0];\n  const { attachments: _attachments, ...rest } = props; // eslint-disable-line @typescript-eslint/no-unused-vars\n\n  if (isVideoAttachment(mediaAttachment, SUPPORTED_VIDEO_FORMATS)) {\n    return <VideoContainer attachment={mediaAttachment} {...rest} />;\n  }\n\n  return <ImageContainer attachment={mediaAttachment} {...rest} />;\n};\n\nexport const CardContainer = (props: RenderAttachmentProps) => {\n  const { attachment, Card = DefaultCard } = props;\n  const componentType = 'card';\n\n  if (attachment.actions && attachment.actions.length) {\n    return (\n      <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n        <div className='str-chat__attachment'>\n          <Card {...attachment} />\n          <AttachmentActionsContainer {...props} />\n        </div>\n      </AttachmentWithinContainer>\n    );\n  }\n\n  return (\n    <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n      <Card {...attachment} />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const GiphyContainer = (props: RenderAttachmentProps) => {\n  const { attachment, Giphy = DefaultGiphy } = props;\n  const componentType = 'giphy';\n\n  if (attachment.actions && attachment.actions.length) {\n    return (\n      <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n        <div className='str-chat__attachment'>\n          <VisibilityDisclaimer />\n          <Giphy attachment={attachment} />\n          <AttachmentActionsContainer {...props} />\n        </div>\n      </AttachmentWithinContainer>\n    );\n  }\n\n  return (\n    <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n      <Giphy attachment={attachment} />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const FileContainer = (props: RenderAttachmentProps) => {\n  const { attachment } = props;\n\n  if (isVoiceRecordingAttachment(attachment)) {\n    // Without a source `Audio` and `VoiceRecording` render nothing (`useAudioPlayer` needs one),\n    // but their containers would still take up layout.\n    return hasRenderableSource(attachment) ? (\n      <VoiceRecordingContainer {...props} />\n    ) : null;\n  }\n\n  if (isAudioAttachment(attachment)) {\n    return hasRenderableSource(attachment) ? <AudioContainer {...props} /> : null;\n  }\n\n  if (\n    !hasRenderableSource(attachment) ||\n    !isFileAttachment(attachment, SUPPORTED_VIDEO_FORMATS)\n  ) {\n    return null;\n  }\n\n  return <OtherFilesContainer {...props} />;\n};\n\nexport const GalleryContainer = ({\n  attachment,\n  ModalGallery = DefaultModalGallery,\n}: RenderGalleryProps) => {\n  const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n    useComponentContext();\n  const items = useMemo<GalleryItem[]>(\n    () =>\n      attachment.items.reduce<GalleryItem[]>((acc, attachment) => {\n        // Falls back to the local blob preview while the upload is still in flight.\n        const item = toGalleryItemDescriptors({\n          ...attachment,\n          image_url: getAttachmentPreviewUrl(attachment, attachment.image_url),\n        });\n        if (item) acc.push(item);\n        return acc;\n      }, []),\n    [attachment.items],\n  );\n  return (\n    <AttachmentWithinContainer attachment={attachment} componentType='gallery'>\n      <ModalGallery items={items} key='gallery' />\n      {/* One combined bar for the gallery: ModalGallery receives positioned descriptors, not the\n          attachments, so per-item overlays are not possible. */}\n      <AttachmentUploadProgressIndicator\n        attachments={attachment.items}\n        variant='overlay'\n      />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const ImageContainer = (props: RenderAttachmentProps) => {\n  const { attachment, Image = DefaultImage } = props;\n  const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n    useComponentContext();\n  const componentType = 'image';\n  const imageElement = useRef<HTMLImageElement>(null);\n  const { imageAttachmentSizeHandler } = useAttachmentContext();\n  const [attachmentConfiguration, setAttachmentConfiguration] = useState<\n    ImageAttachmentConfiguration | undefined\n  >(undefined);\n\n  useLayoutEffect(() => {\n    if (imageElement.current && imageAttachmentSizeHandler) {\n      const config = imageAttachmentSizeHandler(attachment, imageElement.current);\n      setAttachmentConfiguration(config);\n    }\n  }, [imageElement, imageAttachmentSizeHandler, attachment]);\n\n  // Falls back to the local blob preview while the upload is still in flight.\n  const imgUrlFromAttachment =\n    getAttachmentPreviewUrl(attachment, attachment.image_url, attachment.thumb_url) || '';\n\n  const imageConfig: GalleryItem = {\n    ...toGalleryItemDescriptors({\n      ...attachment,\n      image_url: attachmentConfiguration?.url || imgUrlFromAttachment,\n    }),\n    ref: imageElement,\n    style: getCssDimensionsVariables(imgUrlFromAttachment),\n  };\n\n  if (attachment.actions && attachment.actions.length) {\n    return (\n      <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n        <div className='str-chat__attachment'>\n          <Image {...imageConfig} />\n          <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n          <AttachmentActionsContainer {...props} />\n        </div>\n      </AttachmentWithinContainer>\n    );\n  }\n\n  return (\n    <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n      <Image {...imageConfig} />\n      <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const OtherFilesContainer = ({\n  attachment,\n  File = DefaultFile,\n}: RenderAttachmentProps) => {\n  // Same check as FileContainer, repeated because this is exported and used directly too.\n  if (!hasRenderableSource(attachment)) return null;\n\n  return (\n    <AttachmentWithinContainer attachment={attachment} componentType='file'>\n      <File attachment={attachment} />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const AudioContainer = ({\n  attachment,\n  Audio = DefaultAudioAttachment,\n}: RenderAttachmentProps) => (\n  <AttachmentWithinContainer attachment={attachment} componentType='audio'>\n    <div className='str-chat__attachment'>\n      <Audio attachment={attachment} />\n    </div>\n  </AttachmentWithinContainer>\n);\n\nexport const VoiceRecordingContainer = ({\n  attachment,\n  isQuoted,\n  VoiceRecording = DefaultVoiceRecording,\n}: RenderAttachmentProps) => (\n  <AttachmentWithinContainer attachment={attachment} componentType='voiceRecording'>\n    <div className='str-chat__attachment'>\n      <VoiceRecording attachment={attachment} isQuoted={isQuoted} />\n    </div>\n  </AttachmentWithinContainer>\n);\n\nexport const VideoContainer = (\n  props: Omit<AttachmentProps, 'attachments'> & { attachment: VideoAttachmentType },\n) => {\n  const { attachment, Media } = props;\n  const { AttachmentUploadProgressIndicator = DefaultAttachmentUploadProgressIndicator } =\n    useComponentContext();\n  const componentType = 'media';\n\n  return attachment.actions?.length ? (\n    <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n      <div className='str-chat__attachment'>\n        <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n        <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n        <AttachmentActionsContainer {...props} />\n      </div>\n    </AttachmentWithinContainer>\n  ) : (\n    <AttachmentWithinContainer attachment={attachment} componentType={componentType}>\n      <VideoAttachment attachment={attachment} VideoPlayer={Media} />\n      <AttachmentUploadProgressIndicator attachment={attachment} variant='overlay' />\n    </AttachmentWithinContainer>\n  );\n};\n\nexport const GeolocationContainer = ({\n  Geolocation = DefaultGeolocation,\n  location,\n}: GeolocationContainerProps) => (\n  <AttachmentWithinContainer attachment={location} componentType='geolocation'>\n    <Geolocation location={location} />\n  </AttachmentWithinContainer>\n);\n\nexport const UnsupportedAttachmentContainer = ({\n  attachment,\n  UnsupportedAttachment = DefaultUnsupportedAttachment,\n}: RenderAttachmentProps) => (\n  <AttachmentWithinContainer attachment={attachment} componentType='unsupported'>\n    <UnsupportedAttachment attachment={attachment} />\n  </AttachmentWithinContainer>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,IAAM,uBAAuB,eAC3B,gBAAgB,UAAU,KAC1B,CAAC,CAAC,wBAAwB,YAAY,WAAW,SAAS;AAM5D,IAAa,6BAA6B,EACxC,YACA,UACA,oBACiD;CACjD,IAAI,QAAQ;CACZ,IAAI,QAAQ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