<script setup lang="ts">
import { useAuthStore } from '@/stores/useAuthStore'

const authStore = useAuthStore()

const stats = [
  { title: 'Evenementen', value: 0, icon: 'tabler-calendar-event', color: 'primary' },
  { title: 'Personen', value: 0, icon: 'tabler-users', color: 'success' },
  { title: 'Shifts', value: 0, icon: 'tabler-clock', color: 'warning' },
  { title: 'Briefings', value: 0, icon: 'tabler-mail', color: 'info' },
]
</script>

<template>
  <div>
    <VCard class="mb-6">
      <VCardText>
        <h4 class="text-h4 mb-1">
          Welkom, {{ authStore.user?.name ?? 'gebruiker' }}! 👋
        </h4>
        <p class="text-body-1 mb-0">
          {{ authStore.currentOrganisation?.name ?? 'Geen organisatie geselecteerd' }}
        </p>
      </VCardText>
    </VCard>

    <VRow>
      <VCol
        v-for="stat in stats"
        :key="stat.title"
        cols="12"
        sm="6"
        md="3"
      >
        <VCard>
          <VCardText class="d-flex align-center gap-x-4">
            <VAvatar
              :color="stat.color"
              variant="tonal"
              size="44"
              rounded
            >
              <VIcon
                :icon="stat.icon"
                size="28"
              />
            </VAvatar>
            <div>
              <p class="text-body-1 mb-0">
                {{ stat.title }}
              </p>
              <h4 class="text-h4">
                {{ stat.value }}
              </h4>
            </div>
          </VCardText>
        </VCard>
      </VCol>
    </VRow>
  </div>
</template>
