<script setup>
import { CheckCircleIcon } from '@heroicons/vue/24/solid'
const props = defineProps({ steps: Array, missingCritical: Array })
</script>
<template>
  <div class="bg-gray-50 border rounded p-3 text-xs flex flex-col gap-1 h-fit">
    <div class="font-semibold text-gray-700 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-gray-500'">
      <CheckCircleIcon v-if="s.done" class="h-4 w-4 text-emerald-600" />
      <span v-else class="h-4 w-4 rounded-full border border-gray-300 inline-block"></span>
      <span>{{ s.label }}</span>
    </div>
    <div v-if="missingCritical?.length" class="mt-2 text-red-600 font-medium">Manjkajo kritične: {{ missingCritical.join(', ') }}</div>
    <div v-else class="mt-2 text-emerald-600">Kritične preslikave prisotne</div>
  </div>
</template>
