```javascript import { useState } from 'react' import { Send, Loader } from 'react-feather' export default function ChatInterface({ messages, onSend, isLoading }) { const [input, setInput] = useState('') const handleSubmit = (e) => { e.preventDefault() if (!input.trim()) return onSend(input) setInput('') } return (
{messages.map((msg, i) => (
{msg.content}
))}
setInput(e.target.value)} className="flex-1 p-2 border rounded-l-lg focus:outline-none" placeholder="Type your message..." />
) } ```