import { BasicColumn } from '@/components/Table';
import { h } from 'vue';

export const columns: BasicColumn[] = [
  {
    label: '序号',
    minWidth: 60,
    type: 'index',
    fixed: 'left',
  },
  {
    label: '机器人名称',
    prop: 'robotName',
    minWidth: 100,
  },
  {
    label: '机器人地址',
    prop: 'robotUrl',
    minWidth: 140,
  },
  {
    label: '场景',
    prop: 'workshopCodes',
    minWidth: 120,
    render(record) {
      return h(
        'span',
        {},
        {
          default: () => {
            return record.row.workshopCodes.map((item) => item.name).join(' , ');
          },
        },
      );
    },
  },
];

export enum ENABLED {
  FALSE = '0',
  TRUE = '1',
}
