<script setup lang="ts">
import { ActionEvents, type ListItemDto } from '~/components/pub/my-ui/data/types';
import Button from '~/components/pub/ui/button/Button.vue';

const props = defineProps<{
  rec: ListItemDto
}>()

const recId = inject<Ref<number>>('rec_id')!
const recAction = inject<Ref<string>>('rec_action')!
const recItem = inject<Ref<any>>('rec_item')!
const recDate = inject<Ref<any>>('rec_date')!

function confirm() {
  recId.value = props.rec.id || 0
  recAction.value = ActionEvents.showConfirmVerify
  recItem.value = props.rec
  recDate.value = new Date().getTime()
}
</script>

<template>
    <Button type="button" variant="outline" class="text-orange-500 border border-orange-400 bg-orange-50"
        @click="confirm">
        <Icon name="i-lucide-circle-check" class="h-4 w-4 align-middle transition-colors" />
        Konfirmasi
    </Button>
</template>
