import { useState, useRef, useEffect } from 'react' import { Send } from 'lucide-react' import { ChatBubble } from './ChatBubble' export function ChatWindow({ messages, onSend }) { const [text, setText] = useState('') const bottomRef = useRef(null) useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: 'smooth' }) }, [messages]) const handleSend = () => { if (!text.trim()) return onSend?.(text) setText('') } return (