import { type SendShortcut } from '../../core'; import type { ComponentSize, ThemeColor, VisualVariant } from '../../types'; import '../../content/icon/icon'; import '../button/button'; export type { SendShortcut } from '../../core'; /** Events emitted by the message composer */ export type OreMessageComposerEvents = { input: InputEvent; /** * Fired for a send attempt (the resolved `send-shortcut` or the send button) while the * composer isn't blank/disabled/loading. Cancelable — call `preventDefault()` to keep the * current text in the field instead of the default clear + refocus. */ send: { originalEvent: KeyboardEvent | MouseEvent; value: string; }; }; /** Message composer properties */ export type OreMessageComposerProps = { /** Clear the value and refocus after a non-cancelled `send` (default `true`) */ 'clear-on-send'?: boolean; /** Theme color (card focus ring + default send button color) */ color?: ThemeColor; /** Disable the whole composer (field, slots, and send action) */ disabled?: boolean; /** Error message shown below the field */ error?: string; /** Stretch the composer to the full width of its container */ fullwidth?: boolean; /** Helper text shown below the field */ helper?: string; /** Accessible name for the field — never rendered visually, only as `aria-label` */ label?: string; /** Blocks further sends (e.g. a send is already in flight) without disabling editing */ loading?: boolean; /** Maximum character count; shows a counter */ maxlength?: number; /** Form field name */ name?: string; /** Placeholder text */ placeholder?: string; /** Make the field read-only */ readonly?: boolean; /** * JS-only callback fired with the inner `