import{d as b,$ as I,r as V,o as u,x as w,a as o,Q as j,a0 as L,a2 as D,d2 as S,_ as y,di as d,dj as O,P as x,dk as $,dl as A,ai as M,bh as R,L as C,w as p,g as T,c as q,v as F,q as N,t as Q,F as U,k as B,__tla as G}from"./index-7d5b26d3.js";import{u as k,__tla as H}from"./useIcon-0af8bd14.js";import{b as J,E as K,a as W,__tla as X}from"./el-dropdown-item-a3d3a829.js";let z,P,Y=Promise.all([(()=>{try{return G}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return X}catch{}})()]).then(async()=>{let i,v;i="var(--el-color-black)",P=y(b({name:"ThemeSwitch",__name:"ThemeSwitch",setup(l){const{getPrefixCls:s}=D(),c=s("theme-switch"),a=k({icon:"emojione-monotone:sun",color:"#fde047"}),n=k({icon:"emojione-monotone:crescent-moon",color:"#fde047"}),m=I(),t=V(m.getIsDark),e=r=>{m.setIsDark(r)};return(r,_)=>{const g=S;return u(),w(g,{modelValue:o(t),"onUpdate:modelValue":_[0]||(_[0]=f=>j(t)?t.value=f:null),"active-color":i,"active-icon":o(a),"border-color":i,class:L(o(c)),"inactive-color":i,"inactive-icon":o(n),"inline-prompt":"",onChange:e},null,8,["modelValue","active-icon","class","inactive-icon"])}}}),[["__scopeId","data-v-78cd11f1"],["__file","D:/zx/mall-newfeifan-zx-business/src/layout/components/ThemeSwitch/src/ThemeSwitch.vue"]]),v=()=>({changeLocale:async l=>{const s=d.global,c=await O(Object.assign({"../../locales/en.ts":()=>x(()=>import("./en-706ee4dd.js"),[]),"../../locales/zh-CN.ts":()=>x(()=>import("./zh-CN-3441a76e.js"),[])}),`../../locales/${l}.ts`);s.setLocaleMessage(l,c.default),(a=>{const n=$();d.mode==="legacy"?d.global.locale=a:d.global.locale.value=a,n.setCurrentLocale({lang:a}),A(a)})(l)}}),z=y(b({name:"LocaleDropdown",__name:"LocaleDropdown",props:{color:M.string.def("")},setup(l){const{getPrefixCls:s}=D(),c=s("locale-dropdown"),a=R(),n=C(()=>a.getLocaleMap),m=C(()=>a.getCurrentLocale),t=e=>{if(e===o(m).lang)return;window.location.reload(),a.setCurrentLocale({lang:e});const{changeLocale:r}=v();r(e)};return(e,r)=>{const _=B,g=K,f=W,E=J;return u(),w(E,{class:L(o(c)),trigger:"click",onCommand:t},{dropdown:p(()=>[T(f,null,{default:p(()=>[(u(!0),q(U,null,F(o(n),h=>(u(),w(g,{key:h.lang,command:h.lang},{default:p(()=>[N(Q(h.name),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:p(()=>[T(_,{class:L([e.$attrs.class,"cursor-pointer !p-0"]),color:l.color,size:18,icon:"ion:language-sharp"},null,8,["class","color"])]),_:1},8,["class"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/layout/components/LocaleDropdown/src/LocaleDropdown.vue"]])});export{z as L,P as T,Y as __tla};
