<template>
  <view class="im-chat-text" data-id="message.id">
    <text v-if="message.video" class="cuIcon cuIcon-record"></text>
    <text v-if="!message.video" class="cuIcon cuIcon-dianhua"></text>
    <text class="duration">{{
      message.result ? Math.ceil((message.duration ?? 0) / 60000) + '分钟' : '未接通'
    }}</text>
  </view>
</template>
<script setup lang="ts">
import type VideoCallMessage from '../mode/VideoCallMessage'

interface Props<T> {
  message: T
}
defineProps<Props<VideoCallMessage>>()
</script>
<style scoped>
.duration {
  margin-left: 5px;
}
</style>
