/** 迁自 sp-tems-ui `config/status.js` 中与目标相关的枚举 */

export const TARGET_STATUS_OPTIONS = [
  { value: 1, label: '未开始' },
  { value: 2, label: '进行中' },
  { value: 3, label: '已完成' },
  { value: 5, label: '已结束' },
]

export const TARGET_REMARK_OPTIONS = [
  { value: 1, label: '年度目标' },
  { value: 2, label: '季度目标' },
  { value: 3, label: '月度目标' },
]

export function statusLabel(status: number | string | undefined) {
  const n = Number(status)
  return TARGET_STATUS_OPTIONS.find((x) => x.value === n)?.label ?? String(status ?? '')
}
