import type {
  ScheduledConditionRiskLevel,
  ScheduledConditionStatus
} from "../types";

export function getConditionReportRiskLevel(
  status: ScheduledConditionStatus,
  riskLevel: ScheduledConditionRiskLevel
): ScheduledConditionRiskLevel {
  if (status === "error") {
    return "critical";
  }

  if (status === "warning") {
    return "attention";
  }

  return riskLevel;
}
