import type { HTMLAttributes, MouseEvent, ReactElement, ReactNode, Ref } from "react"; import type { VariantProps } from "tailwind-variants"; import { chatMessageStyles } from "./ChatMessage.styles"; import type { IconButtonWithFeedbackProps } from "../../Actions"; import type { UserAvatarProps } from "../../Indicators"; type ChatMessageVariants = VariantProps; type Actions = Record> = Array & { onClick?: (e: MouseEvent, actionsExtraData?: ActionsExtraData) => Promise | void; }>; export type ChatMessageProps = Record> = Omit, "children" | "content"> & { /** * The content of the message. */ content: ReactNode; /** * The avatar of the message. */ avatar?: UserAvatarProps["user"]; /** * The size of the avatar. */ avatarSize?: UserAvatarProps["size"]; /** * The side of the message. */ side?: ChatMessageVariants["side"]; /** * The variant of the message. */ variant?: ChatMessageVariants["variant"]; /** * The actions of the message. */ actions?: Actions; /** * Whether to automatically hide the actions. */ autoHideActions?: boolean; /** * The leading content of the message. */ renderLeading?: ReactNode; /** * The actions content of the message. */ renderActions?: (actions?: Actions) => ReactNode; /** * The footer content of the message. */ renderFooter?: ReactNode; /** * The extra data of the actions. */ actionsExtraData?: ActionsExtraData; /** * Whether to render the message in RTL. */ rtl?: boolean; }; /** * The `ChatMessage` component provides a message to display in the chat. * * See the [ChatMessage documentation page](https://satellite.algolia.com/8261d6576/p/06f740-chat-message) for more information. */ export declare const ChatMessage: = Record>(props: ChatMessageProps & { ref?: Ref; }) => ReactElement | null; export {};