"use client"; import { useState, KeyboardEvent, useEffect, useRef } from "react"; interface HeroInputProps { value: string; onChange: (value: string) => void; onSubmit: () => void; placeholder?: string; className?: string; } export default function HeroInput({ value, onChange, onSubmit, placeholder = "Describe what you want to build...", className = "" }: HeroInputProps) { // const [isFocused, setIsFocused] = useState(false); // Reserved for future focus effects const textareaRef = useRef(null); // Reset textarea height when value changes (especially when cleared) useEffect(() => { if (textareaRef.current) { textareaRef.current.style.height = 'auto'; textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'; } }, [value]); const handleKeyDown = (e: KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); onSubmit(); } }; return (