import{d,u as p,l as c,o as g,c as n,b as o,F as v,p as h,q as L,h as l,t as f,_ as S}from"./tpFEFzWU.js";const b={class:"lang-switcher"},k=["title","onClick"],r="autocode-lang",w=d({__name:"LangSwitcher",setup(C){const{locale:a,locales:_,setLocale:u}=p(),i=c(()=>_.value),m=c(()=>a.value),s=async e=>{await u(e),localStorage.setItem(r,e),document.documentElement.lang=e};return g(()=>{const e=localStorage.getItem(r);e&&e!==a.value&&s(e),document.documentElement.lang=a.value}),(e,E)=>(o(),n("div",b,[(o(!0),n(v,null,h(l(i),t=>(o(),n("button",{key:t.code,class:L(["lang-btn",{active:l(m)===t.code}]),title:t.name,onClick:x=>s(t.code)},f(t.code.toUpperCase()),11,k))),128))]))}}),y=Object.assign(S(w,[["__scopeId","data-v-2d84a2aa"]]),{__name:"LangSwitcher"});export{y as _};
