import type { JSX } from 'solid-js'; /** * The composer, reproducing TORUK Core's `TorukChatInputStandardView` and the two surfaces it * renders on (`useTorukChatInputStyles`). * * Core has two genuinely different layouts, not one layout at two sizes: * * - Landing (`container`): a tall card with 1.5rem of padding and a hairline gradient across its * top edge. The textarea gets its own row — sparkles glyph, then the field — and the controls * sit on a second row underneath: attach on the leading edge, mic and send on the trailing * edge. * - Reply (`compactContainer`): one row, 1rem of padding, no accent line, everything bottom- * aligned — attach, field, mic, send. * * Sizes, radii, fills and the monochrome glyph filter all come from the `--toruk-*` tokens, which * carry Core's own values; nothing here hardcodes a colour. */ export type ComposerSurface = 'landing' | 'reply'; type ChatInputAreaProps = { /** * Pending attachments, drawn inside the composer above the input row — where Core draws them * (`TorukChatInputStandardView`'s `filesPreview` sits first inside its container). Rendering * them outside left the cards floating above the composer's border, and detached from the * landing composer entirely, since that one is mounted somewhere else. */ attachments?: JSX.Element; isBubbleWindow?: boolean; isFullPage?: boolean; surface?: ComposerSurface; userInput: string; inputDisabled: boolean; isLoading: boolean; /** * Whether what the composer holds is actually sendable — text, or attachments that stand on * their own. Owned by the submit controller (`createChatSubmit.canSubmit`) so the button and the * submit path answer the question the same way; this component never re-derives it from * `userInput`, which would miss the attachment-only cases entirely. */ canSend: boolean; placeholder: string; /** * Fallback for the placeholder colour, derived from the resolved background. The design tokens * normally supply it; this stays as the fallback for a host that mounts the composer directly. */ inputMutedColor: string; /** * Explicit composer fill from the embedder's theme, or undefined. Left undefined the composer * keeps its token fill, which differs between the landing and reply surfaces exactly as Core's * two composer styles do — so this must never be defaulted to the page background. */ textInputBackgroundColor?: string; borderColor?: string; boxShadow?: string; textColor?: string; sendButtonColor?: string; fontSize?: number; /** Resolved theme mode. Kept for callers that still key an asset choice off it. */ themeMode?: 'light' | 'dark'; onInput: (value: string) => void; onSubmit: (value: string) => void; onAttach: () => void; onMicrophoneClicked: () => void; heroFileInputRef: (el: HTMLInputElement) => void; onFileChange: (e: Event) => void; onStop?: () => void; speechToTextEnabled?: boolean; uploadsEnabled?: boolean; }; export declare const ChatInputArea: (props: ChatInputAreaProps) => JSX.Element; export {};