export const SERVICE_TYPE_LABELS = {
  remindFiling: '新建档案',
  addVisitRecord: '预约登记',
  ContentReminder: '宣教发送',
  questionnaire: '问卷调查',
  customerUpdate: '更新客户档案',
  serviceSummary: '咨询服务',
  visitRegistration: '就诊登记',
  followUpNoShow: '未到院回访',
  followUpNoDeal: '未成交回访',
  followUp: '诊后回访',
  followUpPostSurgery: '术后回访',
  followUpPostTreatment: '治疗后回访',
  appointmentReminder: '就诊提醒',
  followUpReminder: '复诊提醒',
  medicationReminder: '用药提醒',
  eventNotification: '活动通知',
  transferToSameTeam: '客户转移（团队内转）',
  transferToOtherTeam: '客户转移（转别的团队）',
  transferToCustomerPool: '客户转移（转公共客户池）',
  adminAllocateTeams: '管理员分配团队',
  adminRemoveTeams: '管理员解除团队',
  share: '客户共享',
  followUpComplaint: '投诉回访',
  followUpActivity: '活动回访',
  other: '其他',
  Feedback: '意见反馈',
  treatmentAppointment: '治疗预约',
  followupAppointment: '复诊预约',
  confirmArrival: '确认到院',
};

export function getServiceTypeLabel(value) {
  const v = String(value || '');
  return SERVICE_TYPE_LABELS[v] || v || '其他';
}

export function getServiceTypeOptions({ excludeCustomerUpdate = true } = {}) {
  return Object.keys(SERVICE_TYPE_LABELS)
    .filter((key) => (excludeCustomerUpdate ? key !== 'customerUpdate' : true))
    .map((key) => ({ value: key, label: SERVICE_TYPE_LABELS[key] }));
}
