import { createI18n } from "vue-i18n"
import { getConfig } from "@/config/config"
import zhCnLocale from "element-plus/dist/locale/zh-cn.mjs"
import enLocale from "element-plus/dist/locale/en.mjs"
import nextZhCn from "./lang/zh-cn"
import nextEn from "./lang/en"
const messages = {
    "zh-cn": {
        ...zhCnLocale,
        noep: { ...nextZhCn },
    },
    "en": {
        ...enLocale,
        noep: { ...nextEn, },
    },
}

const i18n = createI18n({
    legacy: false,
    globalInjection: true,
    locale: getConfig("globalI18n"),
    fallbackLocale: "zh-cn",
    messages,
})
export default i18n