<script setup>
import { CheckCircleIcon } from '@heroicons/vue/24/solid'
import { Badge } from '@/Components/ui/badge'
const props = defineProps({ steps: Array, missingCritical: Array })
</script>
<template>
  <div class="bg-muted/50 border rounded-lg p-4 text-xs flex flex-col gap-2 h-fit">
    <div class="font-semibold text-foreground mb-1">Kontrolni seznam</div>
    <div v-for="s in steps" :key="s.label" class="flex items-center gap-2" :class="s.done ? 'text-emerald-700' : 'text-muted-foreground'">
      <CheckCircleIcon v-if="s.done" class="h-4 w-4 text-emerald-600" />
      <span v-else class="h-4 w-4 rounded-full border-2 border-muted-foreground/30 inline-block"></span>
      <span>{{ s.label }}</span>
    </div>
    <div v-if="missingCritical?.length" class="mt-2">
      <Badge variant="destructive" class="text-[10px]">Manjkajo kritične: {{ missingCritical.join(', ') }}</Badge>
    </div>
    <div v-else class="mt-2">
      <Badge variant="default" class="text-[10px] bg-emerald-600">Kritične preslikave prisotne</Badge>
    </div>
  </div>
</template>
