import * as react_jsx_runtime from 'react/jsx-runtime'; /** * ChatInputArea — WealthX Design System * * General-purpose chat input used across any feature that involves * a conversation or messaging interface (Policy AI, Support Agent, * AI Conversations, Website Chat Widget, etc.). * * Features: * - Textarea with auto-resize up to `maxHeight` * - Enter to send / Shift+Enter for new line * - Optional markdown formatting toolbar (`showMarkdownToolbar`) * - Optional file attachment (Paperclip) — shown only when `onAttachFile` is provided * - Optional image upload (ImagePlus) — shown only when `onAttachImage` is provided * - Focus ring on outer container via `focus-within` * - Fully disabled during streaming / loading states * * @example * */ /** A taggable entry for the `@mention` autocomplete. */ interface ChatMention { /** Stable id of the mentioned entity. This, not the label, is what is stored. */ id: string; /** Shown in the picker and as the chip text. */ label: string; /** Secondary text shown in the picker (e.g. role / email). */ sublabel?: string; } interface ChatInputAreaProps { /** Controlled text value. */ value: string; /** Called on every keystroke. */ onChange: (value: string) => void; /** * Called when the user submits (Enter key or Send button click). * Receives the trimmed text. Not called when value is empty or when disabled. */ onSend: (value: string) => void; /** * When provided, a Paperclip button appears and this callback is fired * with the selected FileList. Hidden when omitted. */ onAttachFile?: (files: FileList) => void; /** * When provided, an ImagePlus button appears and this callback is fired * with the selected image FileList. Hidden when omitted. */ onAttachImage?: (files: FileList) => void; /** Disables all controls — use while streaming / waiting for a response. */ disabled?: boolean; /** Textarea placeholder text. */ placeholder?: string; /** * Hint text rendered below the input box. * Pass `false` to hide it entirely. * Defaults to "Enter to send · Shift+Enter for new line". */ hint?: string | false; /** * Maximum textarea height in pixels before scrolling kicks in. * @default 160 */ maxHeight?: number; /** Focus the textarea on mount. */ autoFocus?: boolean; /** * Show a markdown formatting toolbar (Bold, Italic, Code, Code block) * above the textarea. Wraps selected text or inserts a placeholder. * @default false */ showMarkdownToolbar?: boolean; /** * Show the Send button (and make Enter submit). Set `false` for auto-saving * editors (e.g. notes) where there is no explicit "send" — the Send button is * hidden and Enter inserts a new line instead of submitting. * @default true */ showSend?: boolean; /** * Fill the available height instead of auto-resizing to content. Use inside a * flex container for a full-height editor (e.g. a notes panel). * @default false */ fill?: boolean; /** * Taggable entries for `@mention` autocomplete. When provided, typing `@` * followed by a query opens a picker; navigate with ↑/↓, pick with Enter or * click, and the selected entry is inserted as the markdown link * `[@label](#staff-id)`. * * The id is what gets stored, so a mention keeps pointing at the same person * after a rename and stays unambiguous when two people share a display name. * `MarkdownContent` renders these back as mention chips. */ mentions?: ChatMention[]; className?: string; } declare function ChatInputArea({ value, onChange, onSend, onAttachFile, onAttachImage, disabled, placeholder, hint, maxHeight, autoFocus, showMarkdownToolbar, showSend, fill, mentions, className, }: ChatInputAreaProps): react_jsx_runtime.JSX.Element; export { ChatInputArea, type ChatInputAreaProps, type ChatMention };