import { createOptionsEnum } from "./tool";

export const todoItemTypeMap = {
  survey: 1,
  article: 2,
  remark: 3,
  remind: 4
};

// 文章创作类型
export const articleTypeMap = {
  edit: 0, // 内容编辑
  link: 1, //链接
};

export const sysStatusMap = {
  enabled: 0,
  disabled: 1,
};

export const periodUnitMap = {
  day: 0,
  month: 1,
  year: 2,
};

export const periodUnitEnum = createOptionsEnum([
  { label: "天", value: periodUnitMap.day },
  { label: "月", value: periodUnitMap.month },
  { label: "年", value: periodUnitMap.year },
]);

export const sysStatusEnum = createOptionsEnum([
  { label: "启用", value: sysStatusMap.enabled },
  { label: "停用", value: sysStatusMap.disabled },
]);
// 待办事项类型
export const todoItemTypeEnum = createOptionsEnum([
  { label: "随访问卷", value: todoItemTypeMap.survey },
  { label: "患教文章", value: todoItemTypeMap.article },
  { label: "备注", value: todoItemTypeMap.remark },
  { label: '提醒', value: todoItemTypeMap.remind }
]);

// 待办事项类型
export const todoItemStatusEnum = createOptionsEnum([
  { label: "未完成", value: "0" },
  { label: "已完成", value: "1" },
]);

export const cardTypeEnum = createOptionsEnum([{ label: "身份证", value: "SF" }]);

// 随访单状态
export const followItemStatusEnum = createOptionsEnum([
  { label: "待开始", value: 0, color: "#E6A23C" },
  { label: "进行中", value: 1, color: "#67c23a" },
  { label: "已完成", value: 2, color: "#909399" },
  { label: "已过期", value: 3, color: "#909399" },
  { label: "已终止", value: 4, color: "#F56C6C" },
]);

// 随访问卷|状态
export const surveyTempMap = {
  drafts: 0,
  save: 1,
  online: 2,
  offline: 3,
};
export const surveyTempEnum = createOptionsEnum([
  { label: "草稿", value: surveyTempMap.drafts, color: "#909399" },
  { label: "待发布", value: surveyTempMap.save, color: "#E6A23C" },
  { label: "已发布", value: surveyTempMap.online, color: "#67c23a" },
  { label: "已下线", value: surveyTempMap.offline, color: "#E6A23C" },
]);

//
export const reportStatusEnum = createOptionsEnum([
  {
    label: "待报到",
    value: 0,
    color: "#E6A23C"
  },
  {
    label: "已入组",
    value: 1,
    color: "#67c23a"
  }
  // { label: "待报到", value: null, color: "#909399" },
  // { label: "待审核", value: 0, color: "#E6A23C" },
  // { label: "待分配", value: 1, color: "#E6A23C" },
  // { label: "已入组", value: 2, color: "#67c23a" },
  // { label: "已拒绝", value: 3, color: "#F56C6C" },
]);

// 性别
export const sexMap = {
  female: "女",
  male: "男",
};
export const sexEnum = createOptionsEnum([
  { label: "女", value: sexMap.female },
  { label: "男", value: sexMap.male },
]);

// 就诊类型
export const treatmentEnum = createOptionsEnum([
  { label: "住院", value: "住院" },
  { label: "门诊", value: "门诊" },
]);

// 婚姻状况
export const maritalStatusEnum = createOptionsEnum([
  { label: "未婚", value: 0 },
  { label: "已婚", value: 1 },
  { label: "已婚已育", value: 2 },
]);

// 吸烟史
export const smokingEnum = createOptionsEnum([
  { label: "有", value: 1 },
  { label: "无", value: 0 },
  { label: "有，现已戒烟", value: 2 },
]);

// 喝酒史
export const drinkingEnum = createOptionsEnum([
  { label: "有", value: 1 },
  { label: "无", value: 0 },
  { label: "有，现已戒酒", value: 2 },
]);
