import * as React from "react"; const { useEffect, useRef, useState } = React; interface ChatInputProps { loading: boolean; queuedMessages: { id: string; text: string }[]; onSubmit: (message: string) => void; onCancel: () => void; onRemoveQueuedMessage: (id: string) => void; } export function ChatInput({ loading, queuedMessages, onSubmit, onCancel, onRemoveQueuedMessage, }: ChatInputProps) { const [input, setInput] = useState(""); const inputRef = useRef(null); useEffect(() => { inputRef.current?.focus(); }, []); const handleSubmit = () => { if (!input.trim()) return; onSubmit(input); setInput(""); }; return (
{/* Queued message indicators */} {queuedMessages.map(({ id, text }) => (
Queued {text}
))} {/* Input row */}