import { BasicColumn, FormSchema } from '@/components/Table';
import { h } from 'vue';
import { Switch, Tag } from 'ant-design-vue';
import { setRoleStatus } from '@/api/demo/system';
import { useMessage } from '@/hooks/web/useMessage';

type CheckedType = boolean | string | number;
export const columns: BasicColumn[] = [
  {
    title: '组名称',
    dataIndex: 'name',
    width: 200,
  },
  {
    title: '组领导',
    dataIndex: 'groupLeaderName',
    width: 200,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 180,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'key',
    label: '关键字',
    component: 'Input',
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '组名称',
    required: true,
    component: 'Input',
    ifShow: false,
  },
  {
    field: 'name',
    label: '组名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'groupLeaderName',
    label: '组领导',
    required: true,
    component: 'Input',
    slot: 'leader',
  },
  {
    field: 'groupLeaderId',
    label: '组领导',
    required: true,
    ifShow: false,
    component: 'Input',
  },
  {
    field: 'remark',
    label: '备注',
    component: 'InputTextArea',
  }
];
