import{y as w,b as m,x as _,aY as f,cu as p,H as L,t as b}from"./index-6Jqoo2rk.js";import{a0 as h,ao as C,aQ as k,aO as y,aR as R,ap as S}from"./appDialogsManager-DnVhdlim.js";import"./emailSetup-CFcJlzt-.js";import"./iconTsx-Cr8T7ZIv.js";import"./bootstrapIm-BS8HLnlI.js";import"./transition-DuxZkCEv.js";import"./mediaHeader-B5k-4_FU.js";import"./animations-O3syBkMX.js";import"./accumulate-BydAFozl.js";import"./browser-BlRx6CLO.js";import"./_commonjsHelpers-DsqdWQfm.js";import"./putPreloader-WBjcuDFX.js";import"./htmlToSpan-DhAls8qz.js";import"./anchorCallback-DsA1XczG.js";import"./toast-B3QB1-N7.js";import"./paintQrCode-u2FNs0A8.js";import"./fastBlur-Co-79rP4.js";import"./space-DBcSn32d.js";import"./telInputField-Fj4gE689.js";import"./readBlobAsDataURL-DL2tTmc_.js";import"./tracking-CIK7NCFD.js";import"./getInputPasskeyResponse-RiY9Fe0r.js";import"./base64ToBytes-B7rMxzcy.js";import"./sha256-BMgYLqDy.js";import"./bytesCmp-DgkPox5J.js";const A=b("<div>"),F=()=>{const a=C();let r;return a.collect((async()=>{const t=await _.managers.apiManager.invokeApiCacheable("langpack.getLanguages",{lang_pack:"web"}),e=[],n=new Map,s=new Set,l=t.map(o=>o.lang_code),d=f();t.concat(e).forEach(o=>{if(s.has(o.lang_code))return;s.add(o.lang_code);const u=new k({radioField:new y({text:o.name,name:d,value:o.lang_code}),subtitle:o.native_name});n.set(o.lang_code,u)});const g=R([...n.values()],o=>{p.getLangPackAndApply(o,l.includes(o),!0)});r.replaceChildren(g);const c=await p.getCacheLangPackAndApply(),i=n.get(c.lang_code);if(!i){console.error("no row",i,c);return}i.radioField.setValueSilently(!0)})()),m(S,{get children(){const t=A(),e=r;return typeof e=="function"?L(e,t):r=t,t}})},Z=()=>{const[a]=h();return w(()=>{a.header.classList.add("with-border"),a.container.classList.add("language-container")}),m(F,{})};export{Z as default};
//# sourceMappingURL=language-BlzwGrJK.js.map
