import { FormType } from "@/components/form/interface";

export const EmConfig = (userList) => [
  {
    type: FormType.input,
    label: "处突名称",
    name: "emergency_name",
    value: "",
    rules: [{ required: true, message: "请输入处突名称!" }],
  },
  {
    type: FormType.input,
    label: "任务描述",
    name: "desc",
    value: "",
  },
  {
    type: FormType.input,
    label: "目标位置",
    name: "target_location",
    value: "",
    rules: [{ required: true, message: "请输入目标位置!" }],
  },
  {
    type: FormType.map,
    label: "坐标信息",
    name: "marker",
    value: "",
    rules: [{ required: true, message: "坐标信息不能为空!" }],
  },
  {
    type: FormType.cehckboxGroup,
    label: "参与队伍",
    name: "team_id",
    value: [],
    checkboxData: userList,
    rules: [{ required: true, message: "参与队伍不能为空!" }],
  },
  {
    type: FormType.treeVideo,
    label: "视频地址",
    name: "task_video",
    value: [],
    rules: [{ required: true, message: "请选择视频地址!" }],
  },
];
