<template>
  <div class="flex relative -mr-1 py-2 border-b h-16" @click="$emit('chat')">
    <div class="self-center mr-4 flex-shrink-0">
      <img
        v-if="!isUser"
        class="w-10 h-10 rounded-md object-cover"
        src="@/assets/icons/avatar.png"
        alt="avatar"
      />
      <img
        v-else
        class="w-10 h-10 rounded-md object-contain"
        src="@/assets/icons/staff.png"
        alt="avatar"
      />
    </div>
    <div class="flex-grow overflow-hidden pr-1 flex items-center">
      {{ displayName }}
    </div>
  </div>
</template>
<script setup lang="ts">
defineEmits(["chat"]);
defineProps({
  displayName: String,
  isUser: Boolean,
});
</script>
