const i="TranslationKey",u=async({getConfig:e,cache:t,fs:s})=>{const a=await e(),n=r(a),o=s.scan(/.*sidebars.yaml$/),c=await Promise.all(o.map(f=>t.load(f.relativePath,"yaml").then(d=>d.data)));return{...r(c),...n}},r=e=>{let t={};if(!e)return{};if(Array.isArray(e))for(const s of e)t={...t,...r(s)};if(typeof e=="object")for(const[s,a]of Object.entries(e))if(s.endsWith(i)&&typeof a=="string"){const n=s.slice(0,i.length*-1),o=e[n];if(!l(n)||!l(a)||!y(o))continue;t[a]=o||""}else t={...t,...r(a)};return t},l=e=>e.trim().length>0,y=e=>e==null||typeof e=="string";export{u as collectConfigTranslations};
