import { ExtendedMessage } from '@/atoms/im'
import ChatUserTextContainer from './ChatUserTextContainer'
import ChatOtherTextContainer from './ChatOtherTextContainer'

const ChatTextItem = ({ isUser, message }: { isUser: boolean; message: ExtendedMessage }) => {
  if (isUser) {
    // 用户消息 - 右侧粉色背景
    return <ChatUserTextContainer message={message} />
  }

  // AI消息 - 左侧深色半透明背景
  return <ChatOtherTextContainer message={message} />
}

export default ChatTextItem
