import { ExperimentStatus } from '@/enums';
import themes from '@/styles/theme.less';

export { ExperimentStatus };

export interface ExperimentStatusInfo {
  label: string;
  color: string;
  icon: string;
}

export const experimentStatusInfo: Record<ExperimentStatus, ExperimentStatusInfo> = {
  Running: {
    label: '运行中',
    color: themes.primaryColor,
    icon: '/assets/images/experiment-status/running-icon.png',
  },
  Succeeded: {
    label: '成功',
    color: themes.successColor,
    icon: '/assets/images/experiment-status/success-icon.png',
  },
  Pending: {
    label: '等待中',
    color: themes.pendingColor,
    icon: '/assets/images/experiment-status/pending-icon.png',
  },
  Failed: {
    label: '失败',
    color: themes.errorColor,
    icon: '/assets/images/experiment-status/fail-icon.png',
  },
  Error: {
    label: '错误',
    color: themes.errorColor,
    icon: '/assets/images/experiment-status/fail-icon.png',
  },
  Terminated: {
    label: '终止',
    color: themes.abortColor,
    icon: '/assets/images/experiment-status/omitted-icon.png',
  },
  Skipped: {
    label: '未执行',
    color: themes.abortColor,
    icon: '/assets/images/experiment-status/omitted-icon.png',
  },
  Omitted: {
    label: '未执行',
    color: themes.abortColor,
    icon: '/assets/images/experiment-status/omitted-icon.png',
  },
};
