import * as React from 'react'; import Box from '@mui/joy/Box'; import Button from '@mui/joy/Button'; import FormControl from '@mui/joy/FormControl'; import Textarea from '@mui/joy/Textarea'; import { IconButton, Stack } from '@mui/joy'; import FormatBoldRoundedIcon from '@mui/icons-material/FormatBoldRounded'; import FormatItalicRoundedIcon from '@mui/icons-material/FormatItalicRounded'; import StrikethroughSRoundedIcon from '@mui/icons-material/StrikethroughSRounded'; import FormatListBulletedRoundedIcon from '@mui/icons-material/FormatListBulletedRounded'; import SendRoundedIcon from '@mui/icons-material/SendRounded'; export type MessageInputProps = { textAreaValue: string; setTextAreaValue: (value: string) => void; onSubmit: () => void; }; export default function MessageInput(props: MessageInputProps) { const { textAreaValue, setTextAreaValue, onSubmit } = props; const textAreaRef = React.useRef(null); const handleClick = () => { if (textAreaValue.trim() !== '') { onSubmit(); setTextAreaValue(''); } }; return (