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

export const GRADE_STATUS_OPTIONS: { id: GradeStatus; fullName: string; color?: string }[] = [
  { id: 'auto', fullName: '无需阅卷', color: '#8c8c8c' },
  { id: 'pending', fullName: '待批改', color: '#fa8c16' },
  { id: 'graded', fullName: '已批改', color: '#52c41a' },
];

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

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