"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.resolveThemeConfig=void0;constvuepress_shared_1=require("@mr-hope/vuepress-shared");constsetThemeLocales=(themeConfig,rootLang)=>{constrootLangPath=(0,vuepress_shared_1.lang2Path)(rootLang);// set locate for basethemeConfig.locales["/"]=Object.assign(Object.assign(Object.assign({},(0,vuepress_shared_1.getLocale)(rootLang)),(themeConfig.locales[rootLangPath]||{})),(themeConfig.locales["/"]||{}));// handle other languagesObject.keys(themeConfig.locales).forEach((path)=>{if(path==="/")return;constlang=(0,vuepress_shared_1.path2Lang)(path);themeConfig.locales[path]=Object.assign(Object.assign({},(0,vuepress_shared_1.getLocale)(lang)),themeConfig.locales[path]);});};constresolveThemeConfig=(themeConfig,rootLang)=>{setThemeLocales(themeConfig,rootLang);};exports.resolveThemeConfig=resolveThemeConfig;