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

const action = defineAsyncComponent(() => import('./dropdown-action-p.vue'))

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

  headers: [[{ label: 'Kode' }, { label: 'Nama (FHIR)' }, { label: 'Nama (ID)' }, { label: '' }]],

  keys: ['code', 'name', 'indName', 'action'],

  delKeyNames: [
    { key: 'code', label: 'Kode' },
    { key: 'name', label: 'Nama (FHIR)' },
    { key: 'indName', label: 'Nama (ID)' },
  ],

  parses: {},

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

  htmls: {},
}
