import { useStore, observer } from "@/stores/utils"
import VoiceChat from "./VoiceChat"
import TextChat from "./TextChat"
import { EChatModel } from "@/stores/TrainingStore"
import { useEffect } from "react"
const Training = () => {
  const { TrainingStore } = useStore()
  const { chatModel, getBotInfo } = TrainingStore
  useEffect(() => {
    getBotInfo()
  }, [])
  return (
    <div className="training_wrapper">
      {chatModel === EChatModel.VOICE ? <VoiceChat /> : <TextChat />}
    </div>
  )
}

export default observer(Training)
