// components/main/kabelueberwachung/kue705FO/hooks/useKueVersion.ts
import { useEffect, useState } from "react";

const useKueVersion = (slotIndex: number, reduxKueVersion: any) => {
  const [kueVersion, setKueVersion] = useState("V4.19");

  useEffect(() => {
    if (reduxKueVersion?.[slotIndex]) {
      setKueVersion("V" + Number(reduxKueVersion[slotIndex]) / 100);
    }
  }, [slotIndex, reduxKueVersion]);

  return kueVersion;
};

export default useKueVersion;
