import{r as g,q as p,R as m,o as s,c as o,a as e,t as c,F as v,d as h,b as w}from"./app-43851608.js";const _={class:"relative text-sm"},x=e("div",null,[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5"},[e("path",{d:"M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2S2 6.477 2 12"}),e("path",{d:"M13 2.05S16 6 16 12s-3 9.95-3 9.95m-2 0S8 18 8 12s3-9.95 3-9.95M2.63 15.5h18.74m-18.74-7h18.74"})])])],-1),f={class:"uppercase"},k=e("div",{class:"ml-auto"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M4.47 9.4a.75.75 0 0 1 1.06 0l6.364 6.364a.25.25 0 0 0 .354 0L18.612 9.4a.75.75 0 0 1 1.06 1.06l-6.364 6.364a1.75 1.75 0 0 1-2.475 0L4.47 10.46a.75.75 0 0 1 0-1.06","clip-rule":"evenodd"})])],-1),b={key:0,class:"absolute bg-white z-10 px-1 py-2 mt-2 shadow w-full rounded-md min-w-[8em] text-black"},L=["href"],B={__name:"LangToggle",props:{languages:Object,currentLanguage:String},setup(i){const a=i,t=g(!1),u=()=>{t.value=!t.value},l=r=>{t.value&&!r.target.closest(".lang-dd")&&(t.value=!1)};return p(()=>{document.body.addEventListener("click",l)}),m(()=>{document.body.removeEventListener("click",l)}),(r,d)=>(s(),o("div",_,[e("div",{onClick:d[0]||(d[0]=n=>u()),class:"lang-dd flex items-center space-x-2 rounded-xl cursor-pointer"},[x,e("div",f,c(a.currentLanguage),1),k]),t.value?(s(),o("div",b,[e("div",null,[(s(!0),o(v,null,h(a.languages,(n,y)=>(s(),o("a",{href:"/language/"+n.code,class:"block px-2 py-1 cursor-pointer hover:bg-slate-100 rounded-md"},c(n.name),9,L))),256))])])):w("",!0)]))}};export{B as _};
