<script setup lang="ts">
defineProps<{
  polling: boolean
  pollCount: number
}>()

defineEmits<{ stop: [] }>()
</script>

<template>
  <div v-if="polling" class="flex items-center justify-center gap-3 py-4">
    <UIcon name="i-lucide-loader" class="animate-spin text-primary-500" />
    <p class="text-sm text-muted">
      Buscando mas resultados (ronda {{ pollCount }})...
    </p>
    <UButton label="Parar" size="xs" color="neutral" variant="ghost" @click="$emit('stop')" />
  </div>
</template>
