import cs from 'classnames';
import { View } from 'tuikit-atomicx-react/chat';
import { isCallMessage } from '../../../../utils/call';
import { isSafeUrl } from '../../../../utils/url';
import { CallMessage } from './CallMessage';
import classes from './CustomMessage.module.scss';
import type { MessageInfo, CustomMessagePayload } from 'tuikit-atomicx-react/chat';
interface CustomMessageProps {
message: MessageInfo;
}
interface CustomMessageData {
businessID: string;
[key: string]: any;
}
function CustomMessage(props: CustomMessageProps) {
const { message } = props;
const bubbleClasses = cs(classes['custom-message'], {
[classes['custom-message--self']]: message.isSentBySelf,
[classes['custom-message--other']]: !message.isSentBySelf,
});
if (isCallMessage(message)) {
return (