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


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

export const config: Config = {
  cols: [{}, {}, { width: 50 }],
  headers: [[{ label: 'Nama' }, { label: 'Jumlah' }, { label: '' }]],
  keys: ['name', 'count', 'action'],
  delKeyNames: [
    { key: 'name', label: 'Nama' },
    { key: 'count', label: 'Jumlah' },
  ],
  skeletonSize: 10
  // funcParsed: {
  //   parent: (rec: unknown): unknown => {
  //     const recX = rec as SmallDetailDto
  //     return recX.parent?.name || '-'
  //   },
  // },
  // funcComponent: {
  //   action(rec: object, idx: any) {
  //     const res: RecComponent = {
  //       idx,
  //       rec: rec as object,
  //       component: action,
  //       props: {
  //         size: 'sm',
  //       },
  //     }
  //     return res
  //   },
  // }
}

