export const getAlarmDisplayText = (
  slotIndex: number,
  kuePSTmMinus96V: number[] | undefined,
  kueCableBreak: number[] | undefined,
  kueGroundFault: number[] | undefined,
  kueAlarm1: number[] | undefined,
  kueAlarm2: number[] | undefined,
  kueOverflow: number[] | undefined,
  isolationswert: string | number,
  isoDisplayText: string,
  groundFaultDisplayText: string,
  isoFaultDisplayText: string,
  loopFaultDisplayText: string,
  isoGreaterThan200: string
) => {
  if (Number(kuePSTmMinus96V?.[slotIndex]) === 1) {
    return "PST-M prüfen";
  } else if (Number(kueCableBreak?.[slotIndex]) === 1) {
    return isoDisplayText;
  } else if (Number(kueGroundFault?.[slotIndex]) === 1) {
    return groundFaultDisplayText;
  } else if (Number(kueAlarm1?.[slotIndex]) === 1) {
    return isoFaultDisplayText;
  } else if (Number(kueAlarm2?.[slotIndex]) === 1) {
    return loopFaultDisplayText;
  } else if (Number(kueOverflow?.[slotIndex]) === 1) {
    return isoGreaterThan200;
  } else {
    return isolationswert.toString();
  }
};
