import { useState, useRef } from "react" import { Paperclip, Mic, Send, X } from "lucide-react" export default function InputBar({ onSend, loading }) { const [text, setText] = useState("") const [image, setImage] = useState(null) const fileRef = useRef(null) const handleSend = () => { if (!text.trim() && !image) return if (loading) return onSend(text.trim(), image) setText("") setImage(null) } return (
{image && (
{image.name} setImage(null)} style={{ marginLeft: "auto", cursor: "pointer", color: "#94a3b8" }} />
)}
setText(e.target.value)} onKeyDown={e => e.key === "Enter" && handleSend()} placeholder="Type a clinical note or question…" disabled={loading} style={{ flex: 1, border: "none", background: "transparent", fontSize: "14px", outline: "none", color: "#0f172a", }} /> setImage(e.target.files[0] || null)} />
) }