import{d as y,V as O,r as j,o as u,l as w,a as o,y as A,W as v,Y as b,b$ as x,_ as C,dq as d,dr as S,aK as D,ds as $,dt as z,p as G,cn as H,b as E,w as p,i as P,c as M,k as R,j as q,t as F,F as K,v as N,__tla as U}from"./index-2c56227b.js";import{u as T,__tla as W}from"./useIcon-6e34ed1f.js";import{b as Y,E as B,a as J,__tla as Q}from"./el-dropdown-item-81eb3760.js";let k,V,X=Promise.all([(()=>{try{return U}catch{}})(),(()=>{try{return W}catch{}})(),(()=>{try{return Q}catch{}})()]).then(async()=>{let i,L;i="var(--el-color-black)",V=C(y({name:"ThemeSwitch",__name:"ThemeSwitch",setup(l){const{getPrefixCls:s}=b(),n=s("theme-switch"),a=T({icon:"emojione-monotone:sun",color:"#fde047"}),t=T({icon:"emojione-monotone:crescent-moon",color:"#fde047"}),m=O(),c=j(m.getIsDark),e=r=>{m.setIsDark(r)};return(r,_)=>{const g=x;return u(),w(g,{modelValue:o(c),"onUpdate:modelValue":_[0]||(_[0]=f=>A(c)?c.value=f:null),"active-color":i,"active-icon":o(a),"border-color":i,class:v(o(n)),"inactive-color":i,"inactive-icon":o(t),"inline-prompt":"",onChange:e},null,8,["modelValue","active-icon","class","inactive-icon"])}}}),[["__scopeId","data-v-78cd11f1"],["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue"]]),L=()=>({changeLocale:async l=>{const s=d.global,n=await S(Object.assign({"../../locales/en.ts":()=>D(()=>import("./en-706ee4dd.js"),[]),"../../locales/zh-CN.ts":()=>D(()=>import("./zh-CN-b8ee8e05.js"),[])}),`../../locales/${l}.ts`);s.setLocaleMessage(l,n.default),(a=>{const t=$();d.mode==="legacy"?d.global.locale=a:d.global.locale.value=a,t.setCurrentLocale({lang:a}),z(a)})(l)}}),k=C(y({name:"LocaleDropdown",__name:"LocaleDropdown",props:{color:G.string.def("")},setup(l){const{getPrefixCls:s}=b(),n=s("locale-dropdown"),a=H(),t=E(()=>a.getLocaleMap),m=E(()=>a.getCurrentLocale),c=e=>{if(e===o(m).lang)return;window.location.reload(),a.setCurrentLocale({lang:e});const{changeLocale:r}=L();r(e)};return(e,r)=>{const _=N,g=B,f=J,I=Y;return u(),w(I,{class:v(o(n)),trigger:"click",onCommand:c},{dropdown:p(()=>[P(f,null,{default:p(()=>[(u(!0),M(K,null,R(o(t),h=>(u(),w(g,{key:h.lang,command:h.lang},{default:p(()=>[q(F(h.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:p(()=>[P(_,{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"])}}}),[["__file","E:/GAOHP_2023/mall/newfeifan-front/yudao-ui-admin-vue3/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue"]])});export{k as L,V as T,X as __tla};
