<script setup lang="ts">
import { Badge } from '~/components/pub/ui/badge'

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

const doctorStatus = {
  0: 'Tidak Aktif',
  1: 'Aktif',
}

const statusText = computed(() => {
  return doctorStatus[props.rec.status_code as keyof typeof doctorStatus]
})

const badgeVariant = computed(() => {
  return props.rec.status_code === 1 ? 'default' : 'destructive'
})
</script>

<template>
  <div class="flex justify-center">
    <Badge :variant="badgeVariant">
      {{ statusText }}
    </Badge>
  </div>
</template>
