import i18n from "../../locales/index.mjs";
import { useBasicStore } from "../../stores/basic.mjs";
const languageMap = {
  zh: "zh-CN",
  en: "en-US"
};
const setLanguage = (language) => {
  const currentLanguage = languageMap[language];
  if (!currentLanguage) return;
  const basicStore = useBasicStore();
  i18n.global.locale.value = currentLanguage;
  basicStore.setLang(currentLanguage);
  localStorage.setItem("tuiRoom-language", currentLanguage);
};
export {
  setLanguage
};
