import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Send } from "lucide-react"; interface ChatInputProps { inputMessage: string; setInputMessage: (message: string) => void; onSendMessage: () => void; isLimitReached: boolean; isLoading: boolean; } export const ChatInput = ({ inputMessage, setInputMessage, onSendMessage, isLimitReached, isLoading, }: ChatInputProps) => { const handleKeyPress = (e: React.KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); onSendMessage(); } }; return (
setInputMessage(e.target.value)} onKeyPress={handleKeyPress} placeholder="Describe tu consulta médica aquí..." disabled={isLimitReached || isLoading} className="flex-1 rounded-xl" />
); };