import { shareTypeOptions } from "./_options";
import { FormConfig } from "/@/components/PageSearch";
import { convertOptions } from "/@/utils/column-helper";

const searchFormConfig: FormConfig = {
  formItems: [
    {
      field: "group",
      type_field: "group_type",
      type: "input_group",
      otherOptions: {
        inputGroupOptions: [
          { value: "source_nickname", label: "数据源用户名" },
          { value: "source_group_title", label: "数据源用户组名" },
          { value: "nickname", label: "共享用户名" },
          { value: "group_title", label: "共享用户组名" }
        ]
      }
    },
    {
      field: "type",
      type: "select",
      placeholder: "数据权限",
      options: convertOptions(shareTypeOptions)
    }
  ]
};

export default searchFormConfig;
