import React from 'react'; import type { SharedLocationResponse, Attachment as StreamAttachment } from 'stream-chat'; import type { AttachmentActionsDefaultFocusByType, AttachmentActionsProps } from './AttachmentActions'; import type { AudioProps } from './Audio'; import type { VoiceRecordingProps } from './VoiceRecording'; import type { CardProps } from './LinkPreview/Card'; import type { FileAttachmentProps } from './FileAttachment'; import type { UnsupportedAttachmentProps } from './UnsupportedAttachment'; import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler'; import type { GeolocationProps } from './Geolocation'; import type { GiphyAttachmentProps } from './Giphy'; import type { VideoPlayerProps } from '../VideoPlayer'; import type { ModalGalleryProps } from './ModalGallery'; import type { ImageProps } from './Image'; export declare const ATTACHMENT_GROUPS_ORDER: readonly ["media", "giphy", "card", "geolocation", "file", "unsupported"]; export type AttachmentProps = { /** The message attachments to render, see [attachment structure](https://getstream.io/chat/docs/javascript/message_format/?language=javascript) **/ attachments: (StreamAttachment | SharedLocationResponse)[]; /** The handler function to call when an action is performed on an attachment, examples include canceling a \/giphy command or shuffling the results. */ actionHandler?: ActionHandlerReturnType; /** * Which attachment action button receives focus on initial render, keyed by attachment type. * Values must match an action's `value` (e.g. `'send'`, `'cancel'`, `'shuffle'` for giphy attachment). * Default: `{ giphy: 'send' }`. * To disable auto-focus (e.g. when rendering the Giphy preview above the composer so focus * stays in the message input), pass an empty object: `attachmentActionsDefaultFocus={{}}`. */ attachmentActionsDefaultFocus?: AttachmentActionsDefaultFocusByType; /** Custom UI component for displaying attachment actions, defaults to and accepts same props as: [AttachmentActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/AttachmentActions.tsx) */ AttachmentActions?: React.ComponentType; /** Custom UI component for displaying an audio type attachment, defaults to and accepts same props as: [Audio](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Audio.tsx) */ Audio?: React.ComponentType; /** Custom UI component for displaying a card type attachment, defaults to and accepts same props as: [Card](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Card.tsx) */ Card?: React.ComponentType; /** Custom UI component for displaying a file type attachment, defaults to and accepts same props as: [File](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/FileAttachment.tsx) */ File?: React.ComponentType; /** Custom UI component for displaying a gallery of image type attachments, defaults to and accepts same props as: [ModalGallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/ModalGallery.tsx) */ ModalGallery?: React.ComponentType; Geolocation?: React.ComponentType; /** Custom UI component for displaying a Giphy image, defaults to and accepts same props as: [Giphy](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Giphy.tsx) */ Giphy?: React.ComponentType; /** Custom UI component for displaying an image type attachment, defaults to and accepts same props as: [Image](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Image.tsx) */ Image?: React.ComponentType; /** Optional flag to signal that an attachment is a displayed as a part of a quoted message */ isQuoted?: boolean; /** Custom UI component for displaying a media type attachment, defaults to `ReactPlayer` from 'react-player' */ Media?: React.ComponentType; /** Custom UI component for displaying unsupported attachment types, defaults to NullComponent */ UnsupportedAttachment?: React.ComponentType; /** Custom UI component for displaying an audio recording attachment, defaults to and accepts same props as: [VoiceRecording](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/VoiceRecording.tsx) */ VoiceRecording?: React.ComponentType; }; /** * A component used for rendering message attachments. */ export declare const Attachment: (props: AttachmentProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Attachment.d.ts.map