export const CALIBRATION_PAGE_SIZE = 100;

export const CALIBRATION_SKELETON_ROW_COUNT = 5;

export const CalibrationFilter = {
  ALL: 'ALL',
  PENDING: 'PENDING',
  CALIBRATED: 'CALIBRATED',
} as const;

export type CalibrationFilter =
  (typeof CalibrationFilter)[keyof typeof CalibrationFilter];

export const CALIBRATION_FILTERS: {
  value: CalibrationFilter;
  translationKey: string;
}[] = [
  { value: CalibrationFilter.ALL, translationKey: 'general:all_female' },
  {
    value: CalibrationFilter.PENDING,
    translationKey: 'performance:calibration.status.pending',
  },
  {
    value: CalibrationFilter.CALIBRATED,
    translationKey: 'performance:calibration.status.calibrated',
  },
];

export const calibrationFilterToAnswered = (
  filter: CalibrationFilter,
): boolean | undefined => {
  if (filter === CalibrationFilter.PENDING) return false;
  if (filter === CalibrationFilter.CALIBRATED) return true;
  return undefined;
};
