import { createI18n } from "vue-i18n";
import ar from "./ar.json";
import enUS from "./en-US.json";
import zhCN from "./zh-CN.json";
import zhHK from "./zh-HK.json";

export type MessageSchema = typeof zhCN;

const i18n = createI18n<MessageSchema, "zh-CN" | "zh-HK" | "en-US" | "ar">({
  legacy: false,
  locale: "zh-CN",
  fallbackLocale: "en-US",
  messages: {
    "zh-CN": zhCN,
    "zh-HK": zhHK,
    "en-US": enUS,
    "ar": ar,
  },
});

export { i18n };
