<template>
  <div
    class="flex chatlistitem relative -mr-1 py-2 border-b"
    @click="$emit('chat')"
  >
    <div class="self-center mr-4 flex-shrink-0">
      <img
        v-if="isStaff"
        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,
  isStaff: Boolean,
});
</script>
