import { rules, shareTypes, userGroupProps } from "./configs";
import { ModalConfig } from "/@/components/PageModal/src/types";

const modalConfig: ModalConfig = {
  title: "用户组",
  colLayout: { span: 24 },
  formItems: [
    {
      field: userGroupProps.name,
      type: "input",
      label: "组名称",
      labelWidth: "120px",
      rules: rules[userGroupProps.name]
    },
    {
      field: userGroupProps.type,
      type: "select",
      labelWidth: "120px",
      options: shareTypes,
      label: "共享类型",
      rules: rules[userGroupProps.type]
    },
    {
      field: userGroupProps.remark,
      type: "input",
      labelWidth: "120px",
      label: "备注",
      rules: rules[userGroupProps.remark]
    },
    {
      field: userGroupProps.user,
      type: "custom",
      labelWidth: "120px",
      label: "组成员",
      rules: rules[userGroupProps.user]
    }
  ]
};

export default modalConfig;
