import React from 'react'; import type { GiphyVersions, SharedLocationResponseData, 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'; import { type ImageAttachmentConfiguration, type VideoAttachmentConfiguration } from '../../context/AttachmentContext'; export declare const ATTACHMENT_GROUPS_ORDER: readonly ["media", "giphy", "card", "geolocation", "file", "unsupported"]; export type ImageAttachmentSizeHandler = (attachment: StreamAttachment, element: HTMLElement) => ImageAttachmentConfiguration; export type VideoAttachmentSizeHandler = (attachment: StreamAttachment, element: HTMLElement, shouldGenerateVideoThumbnail: boolean) => VideoAttachmentConfiguration; export type AttachmentProps = { /** Attachments to render. See [attachment structure](https://getstream.io/chat/docs/javascript/message_format/?language=javascript). */ attachments: (StreamAttachment | SharedLocationResponseData)[]; /** Called when an attachment action is performed, e.g. sending or shuffling a giphy preview. */ actionHandler?: ActionHandlerReturnType; /** * Which action button gets initial focus, keyed by attachment type. Values match an action's * `value` (e.g. `'send'`, `'cancel'`, `'shuffle'` for giphy). Defaults to `{ giphy: 'send' }`. * Pass an empty object to disable auto-focus, e.g. when the Giphy preview sits above the * composer and focus should stay in the message input. */ attachmentActionsDefaultFocus?: AttachmentActionsDefaultFocusByType; /** Custom attachment actions UI. Defaults to `AttachmentActions`. */ AttachmentActions?: React.ComponentType; /** Custom UI for audio attachments. Defaults to `Audio`. */ Audio?: React.ComponentType; /** Custom UI for card attachments. Defaults to `Card`. */ Card?: React.ComponentType; /** Custom UI for file attachments. Defaults to `FileAttachment`. */ File?: React.ComponentType; /** Custom UI for the gallery of image attachments. Defaults to `ModalGallery`. */ ModalGallery?: React.ComponentType; Geolocation?: React.ComponentType; /** Custom UI for Giphy attachments. Defaults to `Giphy`. */ Giphy?: React.ComponentType; /** Custom UI for image attachments. Defaults to `ImageComponent`. */ Image?: React.ComponentType; /** Giphy rendition to render. Defaults to `'fixed_height'`. */ giphyVersion?: GiphyVersions; /** Computes the responsive size configuration of an image attachment. */ imageAttachmentSizeHandler?: ImageAttachmentSizeHandler; /** Whether the attachments belong to a quoted message. */ isQuoted?: boolean; /** Custom UI for video attachments. Defaults to `VideoPlayer`. */ Media?: React.ComponentType; /** Whether videos show their thumbnail before playback starts. Defaults to true. */ shouldGenerateVideoThumbnail?: boolean; /** Custom UI for unsupported attachment types. Defaults to `UnsupportedAttachment`. */ UnsupportedAttachment?: React.ComponentType; /** Computes the responsive size configuration of a video attachment. */ videoAttachmentSizeHandler?: VideoAttachmentSizeHandler; /** Custom UI for voice recording attachments. Defaults to `VoiceRecording`. */ VoiceRecording?: React.ComponentType; }; /** Renders message attachments grouped by type. */ export declare const Attachment: (props: AttachmentProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Attachment.d.ts.map