import { SendHorizonal } from "lucide-react" import { useEffect, useRef, useState } from "react" import { cn } from "@/lib/utils" /* =========================================================================== Section 24 — the composer. Enter sends, Shift+Enter adds a newline, send is disabled when empty, and the textarea grows with the content up to a cap. =========================================================================== */ export function OwliverComposer({ onSend, disabled, }: { onSend: (text: string) => void disabled?: boolean }) { const [value, setValue] = useState("") const ref = useRef(null) useEffect(() => { const el = ref.current if (!el) return el.style.height = "auto" el.style.height = `${Math.min(el.scrollHeight, 120)}px` }, [value]) const canSend = value.trim().length > 0 && !disabled function submit() { if (!canSend) return onSend(value.trim()) setValue("") } return (