// English-only UI copy for the public portfolio site.

const I18N = {
  en: {
    nav: { portfolio: "Portfolio", about: "About", contact: "Contact" },
    hero: {
      catL: "Cat. No. SY-2026",
      vol: "Vol. I",
      center: "selected works, two thousand twenty-four to six",
      right: "Score / Sound",
      altLine: "game music composer.",
      statement: [
        "Orchestral-leaning ",
        "scores",
        ", ambient beds, and battle cues written for worlds that need a pulse, and silence that earns its keep.",
      ],
      cta: "Listen to the portfolio",
      ctaMetaSuffix: "tracks / ~13 min",
    },
    portfolio: {
      label: "B / Portfolio",
      title: "Portfolio",
      blurb: "A selection of orchestral cues, ambient beds, and battle music written for games and picture. Click any track to play; drag the waveform to scrub.",
      tracks: "tracks",
      stems: "Stems on request",
    },
    track: {
      game: "Game",
      year: "Year",
    },
    games: {
      originalComposition: "Original Composition",
      steamClientProject: "Steam-listed Game Project",
    },
    about: {
      label: "A - About the composer",
      labelR: "",
      portraitTag: "",
      portraitAlt: "Portrait of Siyun Yoon",
      portraitName: "",
      portraitSub: "",
      lede: "I compose game music, specializing in orchestral-based scores. Because I grew up playing and analyzing various genres, I approach every track as both a composer and a gamer. I frequently work on background music for indie and commercial projects.",
      p1: "On any project, I put your needs and deadlines first. I value clear communication and active revisions, doing everything I can to deliver the perfect soundtrack for your game.",
      p2a: "",
      p2b: "",
      p2c: "",
      facts: {
        based: "Based",
        basedV: "Seoul, KR / works remote",
      },
    },
    footer: {
      pressed: "Pressed in Seoul",
      sides: "Score / Cue / Stem",
    },
    tweaks: {
      title: "Tweaks",
      palette: "Palette",
      paper: "Paper",
      ink: "Ink",
      accent: "Accent",
      type: "Type",
      displayFont: "Display font",
      layout: "Layout",
      showHero: "Show hero",
      compact: "Compact cards",
      angle: "Cover stripe angle",
      quick: "Quick palettes",
      pDefault: "Cream & rust (default)",
      pBone: "Bone & olive",
      pSand: "Sand & ink",
      pNight: "Late-night warm",
    },
  },
};

const I18nContext = React.createContext({
  t: I18N.en,
  lang: "en",
  setLang: () => {},
});

function I18nProvider({ children }) {
  React.useEffect(() => {
    document.documentElement.lang = "en";
    try {
      localStorage.setItem("siyun.lang", "en");
    } catch (e) {}
  }, []);

  const value = { t: I18N.en, lang: "en", setLang: () => {} };
  return <I18nContext.Provider value={value}>{children}</I18nContext.Provider>;
}

function useI18n() {
  return React.useContext(I18nContext);
}

window.I18N = I18N;
window.I18nContext = I18nContext;
window.I18nProvider = I18nProvider;
window.useI18n = useI18n;
