import { ProForm, ProFormText } from '@ant-design/pro-components';

const ServiceRule: React.FC = () => {
  return (
    <ProForm<{
      name: string;
      company: string;
    }>
      grid
      onFinish={async (values) => {
        // await waitTime(2000);
        console.log(values);
        // message.success('提交成功');
      }}
      initialValues={{
        name: '蚂蚁设计有限公司',
        useMode: 'chapter',
      }}
    >
      <ProForm.Group>
        <ProFormText
          width="md"
          name="name"
          label="签约客户名称"
          tooltip="最长为 24 位"
          placeholder="请输入名称"
        />
        <ProFormText
          width="md"
          name="company"
          label="我方公司名称"
          placeholder="请输入名称"
        />
      </ProForm.Group>
      <ProFormText width="sm" name="id" label="主合同编号" />
      <ProForm.Item
        label="数组数据"
        name="dataSource"
        // initialValue={defaultData}
        trigger="onValuesChange"
      >
        {/* <EditableProTable<DataSourceType>
          rowKey="id"
          toolBarRender={false}
          columns={columns}
          recordCreatorProps={{
            newRecordType: 'dataSource',
            position: 'top',
            record: () => ({
              id: Date.now(),
              addonBefore: 'ccccccc',
              decs: 'testdesc',
            }),
          }}
          editable={{
            type: 'multiple',
            editableKeys,
            onChange: setEditableRowKeys,
            actionRender: (row, _, dom) => {
              return [dom.delete];
            },
          }} */}
        {/* /> */}
      </ProForm.Item>
    </ProForm>
  );
};

export default ServiceRule;
