import React from 'react'; import type { ReactPlayerProps } from 'react-player'; import type { Attachment as OneChatAttachment } from '../../types'; import type { AttachmentActionsProps } from './AttachmentActions'; import type { AudioProps } from './Audio'; import type { CardProps } from './Card'; import type { FileAttachmentProps } from './FileAttachment'; import type { GalleryProps, ImageProps } from '../Gallery'; import type { UnsupportedAttachmentProps } from './UnsupportedAttachment'; import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler'; import type { DefaultOneChatGenerics } from '../../types'; export declare const ATTACHMENT_GROUPS_ORDER: readonly ["card", "gallery", "image", "media", "audio", "file", "unsupported"]; export declare type AttachmentProps = { /** The message attachments to render, see [attachment structure](https://openbot.chat/chat/docs/javascript/message_format/?language=javascript) **/ attachments: OneChatAttachment[]; /** 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; /** Custom UI component for displaying attachment actions, defaults to and accepts same props as: [AttachmentActions](https://github.com/botaas/aibot-uikit/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/botaas/aibot-uikit/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/botaas/aibot-uikit/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/botaas/aibot-uikit/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: [Gallery](https://github.com/botaas/aibot-uikit/blob/master/src/components/Gallery/Gallery.tsx) */ Gallery?: React.ComponentType>; /** Custom UI component for displaying an image type attachment, defaults to and accepts same props as: [Image](https://github.com/botaas/aibot-uikit/blob/master/src/components/Gallery/Image.tsx) */ Image?: React.ComponentType; /** 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; }; /** * A component used for rendering message attachments. By default, the component supports: AttachmentActions, Audio, Card, File, Gallery, Image, and Video */ export declare const Attachment: (props: AttachmentProps) => JSX.Element; //# sourceMappingURL=Attachment.d.ts.map