import type { MyPaperStatus } from './types';

export const MY_PAPER_STATUS_OPTIONS: {
  id: MyPaperStatus;
  fullName: string;
  color?: string;
}[] = [
  { id: 'notStarted', fullName: '未开始', color: '#8c8c8c' },
  { id: 'doing', fullName: '考试中', color: '#1890ff' },
  { id: 'submitted', fullName: '已交卷', color: '#52c41a' },
];

export function labelOfMyPaperStatus(v?: string) {
  return MY_PAPER_STATUS_OPTIONS.find((x) => x.id === v)?.fullName ?? v ?? '-';
}

export function colorOfMyPaperStatus(v?: string) {
  return MY_PAPER_STATUS_OPTIONS.find((x) => x.id === v)?.color;
}
