<script setup lang="ts">
import Button from '~/components/pub/ui/button/Button.vue'

const props = defineProps<{
  rec: any
  idx?: number
}>()

// Try to get verify handler from parent via inject
const verifyHandler = inject<(rec: any) => void>('verify-handler', null)

function handleVerify() {
  if (verifyHandler) {
    verifyHandler(props.rec)
  }
}
</script>

<template>
  <div class="flex justify-center">
    <Button
      type="button"
      variant="outline"
      class="border-orange-500 bg-orange-50 text-orange-600 hover:bg-orange-100 hover:text-orange-700"
      @click="handleVerify"
    >
      Verifikasi
    </Button>
  </div>
</template>

