1import{o as h,n as g,s,j as t,D as L,y as i,z as m,E as v,l as a,u as y,C as d,g as j,ao as u,G as S,J as f,ap as _}from"./index-Qt-xmqfm.js";import{P as G}from"./PhrasePumpDueChip-J1B3AThl.js";import{M as x}from"./MobileSelect-DoY7idDN.js";import"./Search-BsLr8YNx.js";import"./Chip-DOPebJ5f.js";function T(l){return n=>{n.key==="Enter"&&(n.preventDefault(),l())}}const I=h(function(){let[n,c]=g.useState(s.settings.translationLang_G),[r,p]=g.useState(s.settings.studyLanguage_G);const o=()=>{if(i.data.showStudyLanguageModal=!1,s.settings.translationLang_G=n,!s.settings.nativeLangSelected){const e=_(n);e&&(s.settings.uiLanguage=e,a.loadUiStrings(s.settings.uiLanguage,"SERVER"))}s.settings.studyLanguage_G=r,s.settings.nativeLangSelected=!0};return t.jsx(t.Fragment,{children:t.jsx(L,{open:i.data.showStudyLanguageModal,onKeyDown:T(o),onClose:()=>{if(s.settings.nativeLangSelected)i.data.showStudyLanguageModal=!1;else return!1},children:t.jsxs(t.Fragment,{children:[t.jsx(m,{}),t.jsx(v,{style:{padding:"0 20px",width:"350px",maxWidth:"100%",textAlign:"center"},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"14px"},children:[t.jsxs("div",{children:[t.jsxs("div",{children:[a.strings.youAreLearning_GT,":"]}),t.jsx("div",{style:{padding:"12px 0",display:"inline-block"},children:t.jsx(x,{value:r,onChange:e=>p(e),options:y.getStudyLangs_itemsPlusNlpPlusCatalogue().map(e=>({value:e.value,label:e.text,searchText:e.text,renderLabel:t.jsxs("span",{style:{display:"flex",alignItems:"center",width:"100%"},children:[t.jsx(d,{lang_G:e.value,langText:e.text,full:!!e.hasSavedItems}),t.jsx("span",{style:{flexGrow:1,marginLeft:"10px"},children:e.text}),t.jsx(G,{lang_G:e.value,hasSavedItems:!!e.hasSavedItems})]}),renderSelected:t.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8},children:[t.jsx(d,{lang_G:e.value,langText:e.text,full:!!e.hasSavedItems}),e.text]})})),width:"300px",drawerTitle:a.strings.youAreLearning_GT,size:"medium",useAutocompleteOnDesktop:!0})})]}),t.jsxs("div",{children:[t.jsx("div",{children:s.settings.nativeLangSelected?a.strings.translationLanguage_label+":":a.strings.yourNativeLanguage_GT}),t.jsx("div",{style:{padding:"12px 0",display:"inline-block"},children:t.jsx(x,{value:n,onChange:e=>c(e),options:j().map(e=>({value:e.value,label:u[e.value],searchText:`${e.text} ${u[e.value]}`})),width:"300px",drawerTitle:s.settings.nativeLangSelected?a.strings.translationLanguage_label:a.strings.yourNativeLanguage_GT,size:"medium",useAutocompleteOnDesktop:!0})})]})]})}),t.jsx(S,{style:{padding:"20px 28px",justifyContent:"center"},children:t.jsxs(f,{variant:"contained",color:"secondary",style:{padding:"6px 24px"},onClick:o,children:[!s.settings.nativeLangSelected&&"OK",s.settings.nativeLangSelected&&a.strings.switchLanguage_GT]})})]})})})});export{I as default};
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.