<template>
  <q-card flat class="users-card q-pa-md">
    <div class="card-header q-mb-md">
      <h6 class="text-h6 q-ma-none">{{ title }}</h6>
      <q-separator />
    </div>
    <div class="card-content">
      <DonutChart :total-users="total" />
    </div>
  </q-card>
</template>

<script setup>
import DonutChart from "./DonutChart.vue";

defineProps({
  total: {
    type: Number,
    default: 1,
  },
  title: {
    type: String,
    default: "",
  },
});
</script>

<style scoped>
.users-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.card-header {
  text-align: left;
}

.card-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.body--light .users-card {
  background: white;
  border: 1px solid #e0e0e0;
}

body.body--dark .users-card {
  background: #1e1e1e;
  border: 1px solid #404040;
}
</style>
