import { useRef, useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Icon } from '@wordpress/icons'; import { DynamicTextarea } from '@help-center/components/ai-chat/DynamicTextarea'; import { send } from '@help-center/components/ai-chat/icons'; export const Question = ({ onSubmit }) => { const [inputValue, setInputValue] = useState(''); const formRef = useRef(null); const handleInputChange = (e) => { setInputValue(e.target.value); }; const handleKeyDown = (e) => { if (e.key === 'Enter' && !e.shiftKey) { formRef?.current?.requestSubmit(); } }; return (
); };