import { SAMPA } from "../sampa";
import { StateMachine } from "../state-machine";
import { apostropheCharacters } from "./apostrophes";
import { dollarState } from "./states/$";
import { aposState } from "./states/'";
import { underState } from "./states/_";
import { aState } from "./states/a";
import { bState } from "./states/b";
import { cState } from "./states/c";
import { dState } from "./states/d";
import { eState } from "./states/e";
import { fState } from "./states/f";
import { gState } from "./states/g";
import { hState } from "./states/h";
import { iState } from "./states/i";
import { jState } from "./states/j";
import { kState } from "./states/k";
import { lState } from "./states/l";
import { mState } from "./states/m";
import { nState } from "./states/n";
import { oState } from "./states/o";
import { oeState } from "./states/oe";
import { pState } from "./states/p";
import { qState } from "./states/q";
import { rState } from "./states/r";
import { sState } from "./states/s";
import { tState } from "./states/t";
import { uState } from "./states/u";
import { vState } from "./states/v";
import { wState } from "./states/w";
import { xState } from "./states/x";
import { yState } from "./states/y";
import { zState } from "./states/z";
import { àState } from "./states/à";
import { âState } from "./states/â";
import { çState } from "./states/ç";
import { èState } from "./states/è";
import { éState } from "./states/é";
import { êState } from "./states/ê";
import { ëState } from "./states/ë";
import { îState } from "./states/î";
import { ïState } from "./states/ï";
import { ôState } from "./states/ô";
import { öState } from "./states/ö";
import { ùState } from "./states/ù";
import { ûState } from "./states/û";

const frStateMachine = new StateMachine(new Map([
  ["_", underState],
  ...apostropheCharacters.map((apostrophe) => [apostrophe, aposState] as const),
  ["$", dollarState],
  ["a", aState],
  ["à", àState],
  ["â", âState],
  ["b", bState],
  ["c", cState],
  ["ç", çState],
  ["d", dState],
  ["e", eState],
  ["é", éState],
  ["è", èState],
  ["ê", êState],
  ["ë", ëState],
  ["f", fState],
  ["g", gState],
  ["h", hState],
  ["i", iState],
  ["î", îState],
  ["ï", ïState],
  ["j", jState],
  ["k", kState],
  ["l", lState],
  ["m", mState],
  ["n", nState],
  ["o", oState],
  ["ô", ôState],
  ["ö", öState],
  ["oe", oeState],
  ["p", pState],
  ["q", qState],
  ["r", rState],
  ["s", sState],
  ["t", tState],
  ["u", uState],
  ["ù", ùState],
  ["û", ûState],
  ["v", vState],
  ["w", wState],
  ["x", xState],
  ["y", yState],
  ["z", zState],
]), SAMPA.FR.consonants, SAMPA.FR.semiConsonants, SAMPA.FR.vowels, SAMPA.FR.semiVowels);

export default frStateMachine;
