<script setup lang="ts">
import type { SeatPlayerCardModel } from './seat-player-card'

defineProps<{
  seatClass: string
  player: SeatPlayerCardModel
}>()
</script>

<template>
  <article
    class="player-badge"
    :class="[seatClass, { 'is-turn': player.isTurn, offline: !player.isOnline }]"
  >
    <div class="avatar-card">{{ player.avatar }}</div>
    <div class="player-meta">
      <p>{{ player.name }}</p>
      <strong>{{ player.money }}</strong>
    </div>
    <span v-if="player.dealer" class="dealer-mark">庄</span>
    <span class="missing-mark">{{ player.missingSuitLabel }}</span>
  </article>
</template>
