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


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 timestamp = inject<Ref<any>>('timestamp')!

const activeKey = ref<string | null>(null)

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

<template>
  <Button @click="process" variant="outline"
          class="text-orange-400 border-orange-400 bg-transparent">
          Pilih
          <Icon name="i-lucide-arrow-right" class="h-4 w-4 align-middle transition-colors" />
        </Button>
</template>
