import { type HTMLAttributes, type ReactNode } from 'react';
import { type VariantProps } from 'class-variance-authority';
export type ChatMessageRole = 'user' | 'assistant' | 'system';
export type ChatMessageStatus = 'sending' | 'sent' | 'error' | 'edited';
export interface ChatMessageAvatar {
name?: string;
src?: string;
/**
* Optional custom avatar node. When provided, it REPLACES the built-in
* `` (initials / image) for this message. Used by the Alia
* pattern to render a Astroid identity tile instead of an avatar, and
* by consumers that want to swap in a user-icon chip, brand glyph, etc.
* The caller is responsible for accessible labelling on the custom node
* — ChatMessage's own `aria-label` already announces the role/time, so
* purely decorative nodes can be `aria-hidden`.
*/
slot?: ReactNode;
}
declare const bubbleVariants: (props?: ({
role?: "system" | "user" | "assistant" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
type NativeProps = Omit, 'content' | 'role'>;
export interface ChatMessageProps extends NativeProps, VariantProps {
role: ChatMessageRole;
content: string;
avatar?: ChatMessageAvatar;
timestamp?: Date | number | string;
status?: ChatMessageStatus;
/** Parse a small, safe subset of markdown. Never renders raw HTML. */
renderMarkdown?: boolean;
/** Invoked when the retry button is activated (error status only). */
onRetry?: () => void;
/**
* Optional action row rendered beneath the message body + timestamp,
* aligned with the message (e.g. the Alia pattern's Copy / Download
* buttons on assistant messages). Default off → renders nothing.
*/
actions?: ReactNode;
/**
* Custom body node rendered verbatim INSTEAD of `content`. When set, the
* markdown tokenizer (`renderBody`) is skipped and the node is rendered
* directly inside the bubble. `content` is still required (used for the
* aria-label context and consumer copy / download). Default off.
*/
body?: ReactNode;
}
export declare const ChatMessage: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=chat-message.d.ts.map