import{U as L,u as x,Y as w,c as l,o as n,b as i,w as t,d as s,p as b,g as u,f as c,am as V,t as r,m as y,C as S,h as C,i as k,V as B,n as I,B as T,e as z,F as N,_ as F}from"./index-b7f60880.js";import{useCustomizerStore as P}from"./customizer-4e710c20.js";import{S as $}from"./StyledMenu-43d0fb1e.js";const D={class:"language-flag"},E=L({__name:"LanguageSwitcher",props:{variant:{default:"default"}},setup(d){const e=d,{t:m}=x(),{languageOptions:v,currentLanguage:M,switchLanguage:p,locale:g}=w(),_=l(()=>v.value.map(o=>({code:o.value,name:o.label,flag:o.flag}))),f=l(()=>g.value),h=async o=>{await p(o)};return(o,O)=>(n(),i($,{offset:"12",location:"bottom center"},{activator:t(({props:a})=>[s(S,y(a,{variant:e.variant==="header"||e.variant==="chatbox"?"flat":"text",color:e.variant==="header"||e.variant==="chatbox"?"var(--v-theme-surface)":void 0,rounded:e.variant==="header"||e.variant==="chatbox"?"sm":void 0,icon:"",size:"small",class:["language-switcher",`language-switcher--${e.variant}`,e.variant==="header"||e.variant==="chatbox"?"action-btn":""]}),{default:t(()=>[s(b,{size:"18",color:e.variant==="default"?u(P)().uiTheme==="PurpleTheme"?"#5e35b1":"#d7c5fa":void 0},{default:t(()=>[c(" mdi-translate ")]),_:1},8,["color"]),s(V,{activator:"parent",location:"top"},{default:t(()=>[c(r(u(m)("core.common.language")),1)]),_:1})]),_:2},1040,["variant","color","rounded","class"])]),default:t(()=>[(n(!0),C(N,null,k(_.value,a=>(n(),i(B,{key:a.code,value:a.code,onClick:U=>h(a.code),class:I([{"styled-menu-item-active":f.value===a.code},"styled-menu-item"]),rounded:"md"},{prepend:t(()=>[T("span",D,r(a.flag),1)]),default:t(()=>[s(z,null,{default:t(()=>[c(r(a.name),1)]),_:2},1024)]),_:2},1032,["value","onClick","class"]))),128))]),_:1}))}});const A=F(E,[["__scopeId","data-v-ce68760c"]]);export{A as L};
