1import{n as e}from"./BZUaxTtE.js";import{o as t}from"./C4np82sZ.js";import{Ht as n,On as r,g as i,k as a,mt as o,un as s,v as c,vn as l}from"./BKdLzFmX.js";import{d as u}from"./4FLKZUPv.js";import{t as d}from"./B9q6HLR8.js";import{a as f}from"./B3ZIQnKl.js";import{t as p}from"./BUBDFXE2.js";import{t as m}from"./-hRLniqB.js";var h=Object.assign(a({__name:`LocaleSwitcher`,props:[`variant`],setup(a){let{$api:h}=t(),g=p(),{locale:_}=e(),v=f(),y=a,b=[{label:`Français - FR`,short:`FR`,value:`fr`,icon:`circle-flags:fx`},{label:`English - EN`,short:`EN`,value:`en`,icon:`circle-flags:gb`},{label:`Português - PT`,short:`PT`,value:`pt`,icon:`circle-flags:pt`},{label:`Español - ES`,short:`ES`,value:`es`,icon:`circle-flags:es`},{label:`Italiano - IT`,short:`IT`,value:`it`,icon:`circle-flags:it`},{label:`Alemán - DE`,short:`DE`,value:`de`,icon:`circle-flags:de`}],x=l(b.map(e=>({label:y.variant===`short`?e.short:e.label,value:e.value,icon:e.icon}))),S=d(`currentLocale`,()=>g.user?.preferredLanguage?g.user.preferredLanguage:_.value),C=i(()=>b.find(e=>e.value===S.value)?.icon);async function w(){if(g.user&&S.value!==g.user.preferredLanguage)return await h(`/users/`+g.user?.id,{method:`PATCH`,body:{preferredLanguage:S.value},headers:{Accept:`application/ld+json`,"Content-Type":`application/ld+json`}})}return n(S,async e=>{u(e===`fr`?`/fr`:v(e),{external:!0})}),(e,t)=>{let n=m;return o(),c(n,{modelValue:r(S),"onUpdate:modelValue":[t[0]||=e=>s(S)?S.value=e:null,t[1]||=e=>w()],icon:r(C),items:r(x),variant:`none`},null,8,[`modelValue`,`icon`,`items`])}}}),{__name:`LocaleSwitcher`});export{h as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.