import { jsx as _jsx } from "react/jsx-runtime";
import ReactMarkdown from "react-markdown";
import DOMPurify from "dompurify";
const Messagedisplay = ({ content, theme, sender }) => {
    const sanitizedContent = DOMPurify.sanitize(content);
    return (_jsx("div", { style: { color: sender == "ava" ? theme.avaMessageBox.textColor : theme.clientMessageBox.textColor }, children: _jsx(ReactMarkdown, { className: "avamodule-message-content", components: {
                a: ({ href, children, ...rest }) => (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", className: "avamodule-message-content", style: { color: sender == "ava" ? theme.avaMessageBox.textColor : theme.clientMessageBox.textColor }, ...rest, children: children })),
                p: ({ node, ...props }) => _jsx("p", { className: "avamodule-message-content", ...props, style: { color: sender == "ava" ? theme.avaMessageBox.textColor : theme.clientMessageBox.textColor } })
            }, children: sanitizedContent }) }));
};
export default Messagedisplay;
//# sourceMappingURL=Messagedisplay.js.map