import { type VariantProps } from 'class-variance-authority'; import * as React from 'react'; import { type HTMLAttributes } from 'react'; import { type AvatarProps } from '../../../molecules/data/Avatar/index.js'; import type { AIInteractionEvent } from '../_shared/interaction-context.js'; declare const messageVariants: (props?: ({ type?: "received" | "sent" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; declare const messageBubbleVariants: (props?: ({ type?: "received" | "sent" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; interface AIMessageContextValue { /** Internal payload identity shared by compound Content and CopyButton. */ copyContent?: React.ReactNode; setCopyContent: React.Dispatch>; /** Message type */ type: 'received' | 'sent'; /** Whether sender is an AI agent */ isAgent: boolean; /** Whether in compact mode */ compact: boolean; /** Whether AI is typing */ isTyping: boolean; /** Callback when thumbs up is clicked */ onThumbsUp?: () => void; /** Callback when thumbs down is clicked */ onThumbsDown?: () => void; /** Callback when copy is clicked */ onCopy?: () => void; /** Callback when list/expand is clicked */ onShowList?: () => void; /** Whether thumbs up is active */ thumbsUpActive?: boolean; /** Whether thumbs down is active */ thumbsDownActive?: boolean; } declare const useAIMessageContext: () => AIMessageContextValue; export interface AIMessageBubbleProps { /** Children (Header, Content, TypingIndicator) */ children?: React.ReactNode; /** Additional class name */ className?: string; } declare function AIMessageBubble({ children, className }: AIMessageBubbleProps): React.JSX.Element; declare namespace AIMessageBubble { var displayName: string; } export interface EmojiReaction { emoji: string; count: number; reacted?: boolean; } export interface AIMessageReactionsProps { /** Emoji reactions to display */ reactions: EmojiReaction[]; /** Callback when reaction is clicked */ onReactionClick?: (emoji: string) => void; /** Additional class name */ className?: string; } declare function AIMessageReactions({ reactions, onReactionClick, className, }: AIMessageReactionsProps): React.JSX.Element | null; declare namespace AIMessageReactions { var displayName: string; } export interface AIMessageThumbsUpProps { /** Click handler */ onClick?: () => void; /** Whether active */ active?: boolean; /** Additional class name */ className?: string; } declare function AIMessageThumbsUp({ onClick, active, className, }: AIMessageThumbsUpProps): React.JSX.Element; declare namespace AIMessageThumbsUp { var displayName: string; } export interface AIMessageThumbsDownProps { /** Click handler */ onClick?: () => void; /** Whether active */ active?: boolean; /** Additional class name */ className?: string; } declare function AIMessageThumbsDown({ onClick, active, className, }: AIMessageThumbsDownProps): React.JSX.Element; declare namespace AIMessageThumbsDown { var displayName: string; } export interface AIMessageCopyButtonProps { /** Return the clipboard operation promise to acknowledge confirmed success. Void callbacks remain intent-only. */ onClick?: () => void; /** Additional class name */ className?: string; } declare function AIMessageCopyButton({ onClick, className }: AIMessageCopyButtonProps): React.JSX.Element; declare namespace AIMessageCopyButton { var displayName: string; } export interface AIMessageListButtonProps { /** Click handler */ onClick?: () => void; /** Additional class name */ className?: string; } declare function AIMessageListButton({ onClick, className }: AIMessageListButtonProps): React.JSX.Element; declare namespace AIMessageListButton { var displayName: string; } export interface AIMessageActionsProps { /** Children (action buttons) */ children?: React.ReactNode; /** Additional class name */ className?: string; } declare function AIMessageActions({ children, className }: AIMessageActionsProps): React.JSX.Element; declare namespace AIMessageActions { var displayName: string; } export interface AIMessageTypingIndicatorProps { /** Additional class name */ className?: string; } declare function AIMessageTypingIndicator({ className, }: AIMessageTypingIndicatorProps): React.JSX.Element; declare namespace AIMessageTypingIndicator { var displayName: string; } export interface Attachment { id: string; name: string; size: string; /** File extension (e.g., 'pdf', 'jpg', 'doc') */ extension?: string; url?: string; thumbnailUrl?: string; } export interface AIMessageAttachmentPreviewProps { /** Attachment data */ attachment: Attachment; /** Message type for styling */ messageType?: 'received' | 'sent'; /** Click handler */ onClick?: () => void; /** Additional class name */ className?: string; } declare function AIMessageAttachmentPreview({ attachment, messageType, onClick, className, }: AIMessageAttachmentPreviewProps): React.JSX.Element; declare namespace AIMessageAttachmentPreview { var displayName: string; } export interface AIMessageAttachmentsProps { /** Attachments to display */ attachments: Attachment[]; /** Message type for styling */ messageType?: 'received' | 'sent'; /** Callback when attachment is clicked */ onAttachmentClick?: (attachment: Attachment) => void; /** Additional class name */ className?: string; } declare function AIMessageAttachments({ attachments, messageType, onAttachmentClick, className, }: AIMessageAttachmentsProps): React.JSX.Element | null; declare namespace AIMessageAttachments { var displayName: string; } export interface AIMessageAvatarProps extends AvatarProps { /** Whether sender is an agent */ isAgent?: boolean; } declare function AIMessageAvatar({ isAgent, ...props }: AIMessageAvatarProps): React.JSX.Element; declare namespace AIMessageAvatar { var displayName: string; } export interface AIMessageContentProps { /** Message content */ children?: React.ReactNode; /** Content as string (alternative to children) */ content?: string; /** Whether to render content as markdown. Defaults to true for received, false for sent. */ markdown?: boolean; /** Callback for interactive component events */ onInteraction?: (event: AIInteractionEvent) => void; /** Additional class name */ className?: string; } declare function AIMessageContent({ children, content, markdown, onInteraction, className, }: AIMessageContentProps): React.JSX.Element; declare namespace AIMessageContent { var displayName: string; } export interface AIMessageHeaderProps { /** Sender name */ senderName?: string; /** Timestamp string */ timestamp?: string; /** Show avatar slot */ avatar?: React.ReactNode; /** Additional class name */ className?: string; } declare function AIMessageHeader({ senderName, timestamp, avatar, className, }: AIMessageHeaderProps): React.JSX.Element | null; declare namespace AIMessageHeader { var displayName: string; } export interface AIMessageRootProps extends Omit, 'content'> { /** Message type */ type?: 'received' | 'sent'; /** Whether sender is an AI agent */ isAgent?: boolean; /** Whether in compact mode */ compact?: boolean; /** Whether AI is typing */ isTyping?: boolean; /** Callback when thumbs up is clicked */ onThumbsUp?: () => void; /** Callback when thumbs down is clicked */ onThumbsDown?: () => void; /** Callback when copy is clicked */ onCopy?: () => void; /** Callback when list/expand is clicked */ onShowList?: () => void; /** Whether thumbs up is active */ thumbsUpActive?: boolean; /** Whether thumbs down is active */ thumbsDownActive?: boolean; /** Children */ children?: React.ReactNode; /** Additional class name */ className?: string; } declare const AIMessageRoot: React.ForwardRefExoticComponent>; export interface AIMessageProps extends VariantProps, Omit, 'content'> { /** Message type - 'received' for incoming, 'sent' for outgoing messages */ type?: 'received' | 'sent'; /** Message content */ content?: string; /** Sender name */ senderName?: string; /** Timestamp */ timestamp?: string; /** Avatar — pass AvatarProps object or a React element */ avatar?: AvatarProps | React.ReactElement; /** Whether the sender is an AI agent */ isAgent?: boolean; /** Whether message is in compact mode (no avatar on subsequent messages) */ compact?: boolean; /** Whether the AI is currently typing */ isTyping?: boolean; /** Whether to render content as markdown. Defaults to true for received, false for sent. */ markdown?: boolean; /** Callback when an interactive component triggers an interaction */ onInteraction?: (event: AIInteractionEvent) => void; /** Attachments */ attachments?: Attachment[]; /** Emoji reactions */ reactions?: EmojiReaction[]; /** Whether to show action toolbar (for agent messages) */ showActions?: boolean; /** Callback when thumbs up is clicked */ onThumbsUp?: () => void; /** Callback when thumbs down is clicked */ onThumbsDown?: () => void; /** Callback when copy is clicked */ onCopy?: () => void; /** Callback when list/expand is clicked */ onShowList?: () => void; /** Callback when emoji reaction is clicked */ onReactionClick?: (emoji: string) => void; /** Callback when attachment is clicked */ onAttachmentClick?: (attachment: Attachment) => void; /** Whether thumbs up is active */ thumbsUpActive?: boolean; /** Whether thumbs down is active */ thumbsDownActive?: boolean; /** Additional class name */ className?: string; } /** * AIMessage - Dual-API component for AI chat messages. * * Supports two usage patterns: * * 1. **Monolithic API (batteries-included)**: * ```tsx * * ``` * * 2. **Composable API (full customization)**: * ```tsx * * * * * * Hello! * * * * * * * * * ``` */ declare const AIMessage: React.ForwardRefExoticComponent> & { Root: React.ForwardRefExoticComponent>; Bubble: typeof AIMessageBubble; Header: typeof AIMessageHeader; Avatar: typeof AIMessageAvatar; Content: typeof AIMessageContent; Actions: typeof AIMessageActions; Reactions: typeof AIMessageReactions; Attachments: typeof AIMessageAttachments; AttachmentPreview: typeof AIMessageAttachmentPreview; TypingIndicator: typeof AIMessageTypingIndicator; CopyButton: typeof AIMessageCopyButton; ThumbsUp: typeof AIMessageThumbsUp; ThumbsDown: typeof AIMessageThumbsDown; ListButton: typeof AIMessageListButton; }; export type { AIMessageRootProps as AIMessageComposableProps }; export { AIMessage, AIMessageActions, AIMessageAttachmentPreview, AIMessageAttachments, AIMessageAvatar, AIMessageBubble, AIMessageContent, AIMessageCopyButton, AIMessageHeader, AIMessageListButton, AIMessageReactions, AIMessageRoot, AIMessageThumbsDown, AIMessageThumbsUp, AIMessageTypingIndicator, messageBubbleVariants, messageVariants, useAIMessageContext, };