<!-- @format -->

<script setup>
import { useMessage } from './useMessage'

const { selectedContact } = useMessage()
</script>

<template>
  <div
    v-if="selectedContact"
    class="flex items-center"
  >
    <div>
      <el-avatar v-if="selectedContact.sessionType === '2'" :size="48" :src="selectedContact.brandInfo?.brandLogo" />
      <img
        v-if="selectedContact.sessionType === '1'"
        src="@/assets/images/avatar.png"
        class="b-rd-50% w-48px h-48px"
        alt=""
        srcset=""
      >
    </div>
    <div class="text-20px fw-600 text-#333 ml-20px">
      {{ selectedContact.sessionType === '2'
        ? selectedContact.brandInfo?.brandName
        : '客服消息' }}
    </div>
  </div>
</template>

<style lang="less" scoped>
.ant-avatar {
  width: 40px;
  height: 40px;
}
</style>
