import styles  from './chat.module.css';

import Input from './input.jsx';
import Messages from './messages.jsx';

export default function Chat({
  chatHistory,
  chatMessages,
  onClose,
  message,
  setChatHistory,
  setMessage,
}) {
  return (
    <div className={styles.chat}>
      <Messages
        chatMessages={chatMessages}
      />
      <Input
        chatHistory={chatHistory}
        onClose={onClose}
        message={message}
        setChatHistory={setChatHistory}
        setMessage={setMessage}
      />
    </div>
  );
}