import type { Config, RecComponent } from '~/components/pub/my-ui/data-table'
import { defineAsyncComponent } from 'vue'

const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))

export const config: Config = {
  cols: [{ width: 120}, {}, {}, { width: 50 }],

  headers: [[
    { label: 'No.RM.' },
    { label: 'Nama Pasien' },
    { label: 'Tempat Lahir' },
    { label: '' },
  ]],

  keys: ['number', 'person.name', 'person.birthPlace_regency.name', 'action'],

  delKeyNames: [
    { key: 'code', label: 'Kode' },
    { key: 'name', label: 'Nama' },
  ],

  parses: {},

  components: {
    action(rec, idx) {
      const res: RecComponent = {
        idx,
        rec: rec as object,
        component: action,
      }
      return res
    },
  },

  htmls: {},
}
