import type {JapaneseMouthShape} from "./types";

export const RHUBARB_TO_JA_MOUTH = {
  X: "rest",
  A: "closed",
  B: "i",
  C: "e",
  D: "a",
  E: "o",
  F: "u",
  G: "i",
  H: "e",
} as const satisfies Record<string, JapaneseMouthShape>;

export const rhubarbMouthToJapanese = (
  source: string
): JapaneseMouthShape => {
  const mouthMap: Readonly<Record<string, JapaneseMouthShape>> =
    RHUBARB_TO_JA_MOUTH;

  return mouthMap[source] ?? "rest";
};
