import * as React from 'react'; import { SxProps, Theme } from '@mui/system'; import { type ChatMessage, type ChatRuntimeActions, type MessageActionsProps } from '@mui/x-chat-headless'; export interface ChatMessageExtraActionContext { /** The message this action bar belongs to (null while loading). */ message: ChatMessage | null; /** Runtime actions (sendMessage, retry, regenerate, …). */ chat: ChatRuntimeActions; } export interface ChatMessageExtraAction { /** Stable id; used as the React key and in the rendered button's data-action attribute. */ id: string; /** Accessible label. Rendered as the button text when no icon is given, and as `aria-label` + tooltip when an icon is given. */ label: string; icon?: React.ReactNode; disabled?: boolean; onClick: (event: React.MouseEvent, context: ChatMessageExtraActionContext) => void; } export interface ChatMessageActionsProps extends MessageActionsProps { className?: string; sx?: SxProps; /** * Declarative action buttons appended after `children`. Lets consumers add * actions without replacing the `messageActions` slot component. */ extraActions?: ChatMessageExtraAction[]; /** * The message this bar belongs to. Injected by `ChatMessage` (from its * existing `useMessage` subscription); pass explicitly in standalone usage. */ message?: ChatMessage | null; } declare const ChatMessageActions: React.ForwardRefExoticComponent>; export { ChatMessageActions };