<template>
  <div class="card">
    <div class="flex items-center justify-between mb-2">
      <h3 class="text-sm font-semibold text-gray-500 uppercase tracking-wide">
        <i :class="icon" class="mr-2"></i>
        {{ title }}
      </h3>
      <span
        v-if="status"
        class="status-badge text-xs"
        :class="status"
      >
        <i class="fas fa-circle text-xs"></i>
      </span>
    </div>
    <div class="flex items-baseline">
      <div class="text-3xl font-bold text-gray-900">{{ value }}</div>
      <span v-if="unit" class="ml-2 text-sm text-gray-500">{{ unit }}</span>
    </div>
  </div>
</template>

<script setup lang="ts">
defineProps<{
  title: string;
  value: string | number;
  unit?: string;
  icon: string;
  status?: 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
}>();
</script>

