import { MessageType } from "@openim/wasm-client-sdk";
import { FC } from "react";
import { useTranslation } from "react-i18next";

import { IMessageItemProps } from ".";
import styles from "./message-item.module.scss";

const CatchMessageRender: FC<IMessageItemProps> = ({ message }) => {
  const { t } = useTranslation();

  const text =
    message.contentType === MessageType.VideoMessage
      ? t("messageDescription.videoNotSupport")
      : t("messageDescription.catchMessage");

  return <div className={styles.bubble}>{text}</div>;
};

export default CatchMessageRender;
