<template>
  <div>
    <template v-if="info.showTime">
      <!--时间划分-->
      <chat-time :info="info"></chat-time>
    </template>
    <template v-if="info.msgType == 1">
      <!--普通聊天-->
      <chat-text :info="info"></chat-text>
    </template>
    <template v-else-if="info.msgType == 2">
      <!--打赏消息-->
      <chat-reward-cash :info="info"></chat-reward-cash>
    </template>
    <template v-else-if="info.msgType == 3">
      <!--普通红包-->
      <chat-red-default :info="info"></chat-red-default>
    </template>
    <template v-else-if="info.msgType == 4">
      <!--领取普通红包-->
      <chat-red-default-tip :info="info"></chat-red-default-tip>
    </template>
    <template v-else-if="info.msgType == 5">
      <!--图片聊天-->
      <chat-img :info="info"></chat-img>
    </template>
    <template v-else-if="info.msgType == 7">
      <!--领取分享红包-->
      <chat-red-share-tip :info="info"></chat-red-share-tip>
    </template>
    <template v-else-if="info.msgType == 8">
      <!--口令红包-->
      <chat-red-password :info="info"></chat-red-password>
    </template>
    <template v-else-if="info.msgType == 9">
      <!--领取口令红包-->
      <chat-red-password-tip :info="info"></chat-red-password-tip>
    </template>
    <template v-else-if="info.msgType == 11">
      <!--领取竞答红包-->
      <chat-red-answer-tip :info="info"></chat-red-answer-tip>
    </template>
    <template v-else-if="info.msgType == 13">
      <!--领取商家红包-->
      <chat-red-business-tip :info="info"></chat-red-business-tip>
    </template>
    <template v-else-if="info.msgType == 14">
      <!--礼物打赏消息-->
      <chat-reward-gift :info="info"></chat-reward-gift>
    </template>
  </div>
</template>

<script>
import chatTime from './chatTime';
import chatText from './chatText';
import chatRewardCash from './chatRewardCash';
import chatRedDefault from './chatRedDefault';
import chatRedDefaultTip from './chatRedDefaultTip';
import chatImg from './chatImg';
import chatRedShareTip from './chatRedShareTip';
import chatRedPassword from './chatRedPassword';
import chatRedPasswordTip from './chatRedPasswordTip';
import chatRedAnswerTip from './chatRedAnswerTip';
import chatRedBusinessTip from './chatRedBusinessTip';
import chatRewardGift from './chatRewardGift';
export default {
  name: 'vertical-chat-item',
  props: {
    info: {
      type: Object,
      default() {
        return {};
      }
    },
    isTop: {
      type: Boolean,
      default() {
        return false;
      }
    }
  },
  components: {
    chatTime,
    chatText,
    chatRewardCash,
    chatRedDefault,
    chatRedDefaultTip,
    chatImg,
    chatRedShareTip,
    chatRedPassword,
    chatRedPasswordTip,
    chatRedAnswerTip,
    chatRedBusinessTip,
    chatRewardGift
  }
};
</script>
