import { ReactNode } from "react";
/**
 * Message role types for AI conversations
 */
export type MessageRole = "user" | "assistant" | "system";
/**
 * Message variant types for chat UI
 */
export type MessageVariant = "sender" | "receiver" | "system";
/**
 * Message delivery status
 */
export type MessageStatus = "sending" | "sent" | "delivered" | "read" | "failed";
/**
 * Attachment types
 */
export type MessageAttachmentType = "file" | "image" | "audio" | "link";
/**
 * Attachment data
 */
export interface MessageAttachment {
    type: MessageAttachmentType;
    name?: string;
    url?: string;
    size?: string;
    duration?: string;
    thumbnailUrl?: string;
    description?: string;
    domain?: string;
}
/**
 * Reaction data
 */
export interface MessageReaction {
    emoji: string;
    count: number;
    reacted?: boolean;
}
/**
 * Reply/quote reference
 */
export interface MessageReplyTo {
    name: string;
    content: string;
    avatar?: string;
}
/**
 * Sender display info
 */
export interface MessageSenderInfo {
    name: string;
    avatar?: string;
}
/**
 * Avatar configuration for message sender
 */
export interface MessageAvatarProps {
    /**
     * The source URL for the avatar image
     */
    src?: string;
    /**
     * The name for the avatar (used for initials and alt text)
     */
    name: string;
    /**
     * Fallback content to display when image fails to load
     */
    fallback?: ReactNode;
}
/**
 * Message component props
 * Supports both props-based API and compound component API
 */
export interface MessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "content"> {
    /**
     * The role of the message sender (AI semantic naming)
     * Takes precedence over variant if both are provided
     * - user: Messages from the user (maps to sender)
     * - assistant: AI-generated responses (maps to receiver)
     * - system: System notifications/messages
     */
    role?: MessageRole;
    /**
     * The variant of the message (Chat UI semantic naming)
     * - sender: User messages (right-aligned)
     * - receiver: Response messages (left-aligned)
     * - system: System notifications (centered)
     * @default "receiver"
     */
    variant?: MessageVariant;
    /**
     * The message content (supports rich content, markdown, etc.)
     * Note: Optional when using compound API with Message.Body
     */
    content?: ReactNode;
    /**
     * The timestamp of the message
     */
    timestamp?: Date | string;
    /**
     * Avatar configuration for the message sender
     * Note: Not shown for system messages
     */
    avatar?: MessageAvatarProps;
    /**
     * Whether to show the timestamp
     * @default true
     */
    showTimestamp?: boolean;
    /**
     * Whether the message is currently streaming (for AI responses)
     * @default false
     */
    isStreaming?: boolean;
    /**
     * Custom streaming indicator content
     * If not provided, a default animated indicator will be shown
     */
    streamingIndicator?: ReactNode;
    /**
     * Speed for word-by-word typing animation in milliseconds
     * Only applies when isStreaming is true for assistant messages
     * @default 100
     */
    typingSpeed?: number;
    /**
     * Custom action buttons slot
     * Overrides default built-in actions (copy, regenerate)
     */
    actions?: ReactNode;
    /**
     * Callback when copy button is clicked (only for assistant/receiver messages)
     */
    onCopy?: () => void;
    /**
     * Callback when regenerate button is clicked (only for assistant/receiver messages)
     */
    onRegenerate?: () => void;
    /**
     * Whether to show built-in action buttons (copy, regenerate)
     * Only shown for assistant/receiver messages when callbacks are provided
     * @default true for assistant messages
     */
    showActions?: boolean;
    /**
     * Delivery status indicator (sending/sent/delivered/read/failed)
     * Only renders for sender variant
     */
    status?: MessageStatus;
    /**
     * Timestamp when the message was read (shown alongside read status)
     */
    readAt?: Date | string;
    /**
     * Callback when retry button is clicked on failed messages
     */
    onRetry?: () => void;
    /**
     * File, image, audio, or link attachments
     */
    attachments?: MessageAttachment[];
    /**
     * Emoji reactions displayed below the message
     */
    reactions?: MessageReaction[];
    /**
     * Callback when a reaction pill is clicked
     */
    onReactionClick?: (emoji: string) => void;
    /**
     * Reply/quote reference shown above message content
     */
    replyTo?: MessageReplyTo;
    /**
     * Sender display info (name shown above receiver bubbles)
     */
    sender?: MessageSenderInfo;
    /**
     * Whether this is a consecutive message from the same sender (hides avatar & name)
     */
    isGrouped?: boolean;
    /**
     * Custom theme overrides
     */
    theme?: MessageThemeOverrides;
}
/**
 * Variant-specific theme styles
 */
export interface MessageVariantTheme {
    containerModifier: string;
    bubbleStyle: string;
    timestampModifier: string;
}
/**
 * Message theme configuration
 */
export interface MessageTheme {
    bubbleBaseStyle: string;
    containerBaseStyle: string;
    timestampStyle: string;
    variants: {
        sender: MessageVariantTheme;
        receiver: MessageVariantTheme;
        system: MessageVariantTheme;
    };
    streamingIndicatorStyle: string;
    actionsContainerStyle: string;
    statusStyle: string;
    statusSending: string;
    statusSent: string;
    statusDelivered: string;
    statusRead: string;
    statusFailed: string;
    attachmentContainerStyle: string;
    fileStyle: string;
    imageStyle: string;
    audioStyle: string;
    linkStyle: string;
    reactionsContainerStyle: string;
    reactionPillStyle: string;
    reactionPillActiveStyle: string;
    replyStyle: string;
    dateDividerStyle: string;
    senderNameStyle: string;
}
/**
 * Theme overrides for Message component
 */
export interface MessageThemeOverrides {
    bubbleBaseStyle?: string;
    containerBaseStyle?: string;
    timestampStyle?: string;
    variants?: {
        sender?: Partial<MessageVariantTheme>;
        receiver?: Partial<MessageVariantTheme>;
        system?: Partial<MessageVariantTheme>;
    };
    streamingIndicatorStyle?: string;
    actionsContainerStyle?: string;
    statusStyle?: string;
    statusSending?: string;
    statusSent?: string;
    statusDelivered?: string;
    statusRead?: string;
    statusFailed?: string;
    attachmentContainerStyle?: string;
    fileStyle?: string;
    imageStyle?: string;
    audioStyle?: string;
    linkStyle?: string;
    reactionsContainerStyle?: string;
    reactionPillStyle?: string;
    reactionPillActiveStyle?: string;
    replyStyle?: string;
    dateDividerStyle?: string;
    senderNameStyle?: string;
    /** @deprecated Use variants.sender.containerModifier instead */
    senderContainerStyle?: string;
    /** @deprecated Use variants.sender.bubbleStyle instead */
    senderBubbleStyle?: string;
    /** @deprecated Use variants.sender.timestampModifier instead */
    senderTimestampStyle?: string;
    /** @deprecated Use variants.receiver.containerModifier instead */
    receiverContainerStyle?: string;
    /** @deprecated Use variants.receiver.bubbleStyle instead */
    receiverBubbleStyle?: string;
    /** @deprecated Use variants.receiver.timestampModifier instead */
    receiverTimestampStyle?: string;
    /** @deprecated Use variants.system.containerModifier instead */
    systemContainerStyle?: string;
    /** @deprecated Use variants.system.bubbleStyle instead */
    systemBubbleStyle?: string;
    /** @deprecated Use variants.system.timestampModifier instead */
    systemTimestampStyle?: string;
}
