import { useState } from 'react'; interface TextInputSectionProps { text: string; onChange: (text: string) => void; onNext: () => void; isLoading: boolean; disabled: boolean; } export default function TextInputSection({ text, onChange, onNext, isLoading, disabled }: TextInputSectionProps) { const [showValidation, setShowValidation] = useState(false); const handleNext = () => { if (text.trim() === '') { setShowValidation(true); return; } setShowValidation(false); onNext(); }; const handleTextChange = (e: React.ChangeEvent) => { onChange(e.target.value); if (e.target.value.trim() !== '') { setShowValidation(false); } }; const isButtonDisabled = disabled || isLoading || text.trim() === ''; return (
📝

Enter Your Text

Paste or type your story below