import{d as m,E as g,G as d,l as f,r as _,o as r,b as i,w as t,q as l,A as L,s as b,H as h,c as v,F as C,a as I,I as V,y as k,v as x}from"./index-2e57ee69.js";import{V as B}from"./VMenu-9f22b74a.js";import{V as w,a as A,b as E}from"./VList-0b71c0f0.js";import"./VDivider-29fb9868.js";const y=m({__name:"I18n",props:{languages:null,location:{default:"bottom end"}},emits:["change"],setup(u){const s=u,{locale:o}=g({useScope:"global"});d(o,n=>{document.documentElement.setAttribute("lang",n)});const a=f(["en"]);return(n,c)=>{const p=_("IconBtn");return r(),i(p,null,{default:t(()=>[l(L,{size:"26",icon:"tabler-language"}),l(B,{activator:"parent",location:s.location,offset:"14px"},{default:t(()=>[l(w,{selected:b(a),"onUpdate:selected":c[0]||(c[0]=e=>h(a)?a.value=e:null),"min-width":"175px"},{default:t(()=>[(r(!0),v(C,null,I(s.languages,e=>(r(),i(A,{key:e.i18nLang,value:e.i18nLang,onClick:F=>{o.value=e.i18nLang,n.$emit("change",e.i18nLang)}},{default:t(()=>[l(E,null,{default:t(()=>[V(k(e.label),1)]),_:2},1024)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["selected"])]),_:1},8,["location"])]),_:1})}}}),S=m({__name:"NavBarI18n",setup(u){const{isAppRtl:s}=x(),o=[{label:"English",i18nLang:"en"},{label:"French",i18nLang:"fr"},{label:"Arabic",i18nLang:"ar"}],a=n=>{s.value=n==="ar"};return(n,c)=>(r(),i(y,{languages:o,onChange:a}))}});export{S as default};
