import{d as C,y as V,r as j,o as d,A as L,a as o,a2 as x,ac as v,ae as b,cC as A,df as u,dg as z,a1 as y,dh as O,di as R,ar as M,cZ as S,e as D,B as g,f as E,c as $,R as B,E as F,G,F as N,_ as U,__tla as Z}from"./index-92ad187a.js";import{u as k,__tla as q}from"./useIcon-5e10664f.js";import{_ as H}from"./_plugin-vue_export-helper-1b428a4d.js";import{b as J,E as K,a as Q,__tla as W}from"./el-dropdown-item-211d5248.js";let I,P,X=Promise.all([(()=>{try{return Z}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{let i,w;i="var(--el-color-black)",I=H(C({name:"ThemeSwitch",__name:"ThemeSwitch",setup(l){const{getPrefixCls:s}=b(),c=s("theme-switch"),a=k({icon:"emojione-monotone:sun",color:"#fde047"}),t=k({icon:"emojione-monotone:crescent-moon",color:"#fde047"}),_=V(),n=j(_.getIsDark),e=r=>{_.setIsDark(r)};return(r,m)=>{const p=A;return d(),L(p,{modelValue:o(n),"onUpdate:modelValue":m[0]||(m[0]=f=>x(n)?n.value=f:null),"active-color":i,"active-icon":o(a),"border-color":i,class:v(o(c)),"inactive-color":i,"inactive-icon":o(t),"inline-prompt":"",onChange:e},null,8,["modelValue","active-icon","class","inactive-icon"])}}}),[["__scopeId","data-v-3b3542c2"]]),w=()=>({changeLocale:async l=>{const s=u.global,c=await z(Object.assign({"../../locales/en.ts":()=>y(()=>import("./en-9c90d1c5.js"),[]),"../../locales/zh-CN.ts":()=>y(()=>import("./zh-CN-640abb2f.js"),[])}),`../../locales/${l}.ts`);s.setLocaleMessage(l,c.default),(a=>{const t=O();u.mode==="legacy"?u.global.locale=a:u.global.locale.value=a,t.setCurrentLocale({lang:a}),R(a)})(l)}}),P=C({name:"LocaleDropdown",__name:"LocaleDropdown",props:{color:M.string.def("")},setup(l){const{getPrefixCls:s}=b(),c=s("locale-dropdown"),a=S(),t=D(()=>a.getLocaleMap),_=D(()=>a.getCurrentLocale),n=e=>{if(e===o(_).lang)return;window.location.reload(),a.setCurrentLocale({lang:e});const{changeLocale:r}=w();r(e)};return(e,r)=>{const m=U,p=K,f=Q,T=J;return d(),L(T,{class:v(o(c)),trigger:"click",onCommand:n},{dropdown:g(()=>[E(f,null,{default:g(()=>[(d(!0),$(N,null,B(o(t),h=>(d(),L(p,{key:h.lang,command:h.lang},{default:g(()=>[F(G(h.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:g(()=>[E(m,{class:v([e.$attrs.class,"cursor-pointer !p-0"]),color:l.color,size:18,icon:"ion:language-sharp"},null,8,["class","color"])]),_:1},8,["class"])}}})});export{I as T,P as _,X as __tla};
