import { createPortal } from 'react-dom' import PropTypes from 'prop-types' import { useSelector } from 'react-redux' import { Dialog, DialogContent, DialogTitle, Button } from '@mui/material' import { ChatMessage } from './ChatMessage' import { StyledButton } from 'ui-component/button/StyledButton' import { IconEraser } from '@tabler/icons' const ChatExpandDialog = ({ show, dialogProps, onClear, onCancel }) => { const portalElement = document.getElementById('portal') const customization = useSelector((state) => state.customization) const component = show ? (
{dialogProps.title}
{customization.isDarkMode && ( } > Clear Chat )} {!customization.isDarkMode && ( )}
) : null return createPortal(component, portalElement) } ChatExpandDialog.propTypes = { show: PropTypes.bool, dialogProps: PropTypes.object, onClear: PropTypes.func, onCancel: PropTypes.func } export default ChatExpandDialog