import { useMemo } from "react";

export default function HitPointsModeText({
  hitPointsMode,
  text,
}: {
  hitPointsMode: number;
  text: string;
}) {
  return (
    <span
      className={useMemo(() => {
        switch (hitPointsMode) {
          case 0:
            return "level2";
          case 2:
            return "level4";
          case 3:
          case 5:
          case 8:
            return "level5";
          case 4:
            return "level1";
          default:
            return "stand";
        }
      }, [hitPointsMode])}
    >
      {text}
    </span>
  );
}
