import { Accessibility, ChatMessageBehaviorProps } from '@fluentui/accessibility'; import { ComponentWithAs } from '@fluentui/react-bindings'; import { PopperShorthandProps } from '../../utils/positioner'; import { UIComponentProps, ChildrenComponentProps, ContentComponentProps } from '../../utils'; import { ShorthandValue, ComponentEventHandler, ShorthandCollection, FluentComponentStaticProps } from '../../types'; import { BoxProps } from '../Box/Box'; import { LabelProps } from '../Label/Label'; import { MenuProps } from '../Menu/Menu'; import { MenuItemProps } from '../Menu/MenuItem'; import { TextProps } from '../Text/Text'; import { ReactionProps } from '../Reaction/Reaction'; import { ReactionGroupProps } from '../Reaction/ReactionGroup'; import { ChatMessageHeaderProps } from './ChatMessageHeader'; import { ChatMessageDetailsProps } from './ChatMessageDetails'; export interface ChatMessageSlotClassNames { actionMenu: string; author: string; timestamp: string; badge: string; content: string; reactionGroup: string; } export interface ChatMessageProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps> { /** Accessibility behavior if overridden by the user. */ accessibility?: Accessibility; /** Menu with actions of the message. */ actionMenu?: ShorthandValue | ShorthandCollection; /** Controls messages's relation to other chat messages. Is automatically set by the ChatItem. */ attached?: boolean | 'top' | 'bottom'; /** Author of the message. */ author?: ShorthandValue; /** Indicates whether message belongs to the current user. */ mine?: boolean; /** A message cane have a custom header */ header?: ShorthandValue; /** Timestamp of the message. */ timestamp?: ShorthandValue; /** Message details info slot for the header. */ details?: ShorthandValue; /** Badge attached to the message. */ badge?: ShorthandValue; /** A message can format the badge to appear at the start or the end of the message. */ badgePosition?: 'start' | 'end'; /** * Called after user's blur. * @param event - React's original SyntheticEvent. * @param data - All props. */ onBlur?: ComponentEventHandler; /** * Called after user's focus. * @param event - React's original SyntheticEvent. * @param data - All props. */ onFocus?: ComponentEventHandler; /** * Called after user enters by mouse. * @param event - React's original SyntheticEvent. * @param data - All props. */ onMouseEnter?: ComponentEventHandler; /** Allows suppression of action menu positioning for performance reasons */ positionActionMenu?: boolean; /** Reaction group applied to the message. */ reactionGroup?: ShorthandValue | ShorthandCollection; /** A message can format the reactions group to appear at the start or the end of the message. */ reactionGroupPosition?: 'start' | 'end'; /** Positions an actionMenu slot in "fixed" mode. */ unstable_overflow?: boolean; } export declare type ChatMessageStylesProps = Pick & { focused: boolean; hasBadge: boolean; hasReactionGroup: boolean; }; export declare const chatMessageClassName = "ui-chat__message"; export declare const chatMessageSlotClassNames: ChatMessageSlotClassNames; /** * A ChatMessage represents a single message in chat. */ export declare const ChatMessage: ComponentWithAs<'div', ChatMessageProps> & FluentComponentStaticProps;