import{_ as f}from"./USelect.vue_vue_type_script_setup_true_lang-BgoCOcXc.js";import{r as o,f as v,g as r,h as b,o as S,w as $,a as m,u as C}from"./index-DRopsKkO.js";import{_}from"./BasePage-C3DiNX0e.js";import{u as A,O as V}from"./index-_-ijfL1Q.js";import"./ULabel.vue_vue_type_script_setup_true_lang-B9XE8rwf.js";import"./UDivider.vue_vue_type_script_setup_true_lang-CGxguuHo.js";import"./useMutationObserver-DtW-3lQD.js";const E={__name:"Page",setup(w){const a=A(),d=o([]),c=o([]),n=o(""),l=o(""),s=e=>e||r.getActiveLanguage();v(async()=>{await a.getLanguages(),await a.getDefaultLanguages(),d.value=a.adminLanguagesForSelect,c.value=a.clientLanguagesForSelect,n.value=s(a.defaultLanguages.adminLanguage),l.value=s(a.defaultLanguages.clientLanguage)});async function L(e){let t=s(a.defaultLanguages.adminLanguage),g=s(a.defaultLanguages.clientLanguage);const u=n.value!==t,i=l.value!==g;(u||i)&&(await a.setDefaultLanguages(n.value,l.value),u&&(r.setActiveLanguage(n.value),await r.getMessages(),r.setMessages())),e()}return(e,t)=>{const g=f;return S(),b(_,{group:e.$t("group.languages"),"group-step":C(V)*1,title:e.$t("title.languages"),description:e.$t("description.languages"),next:{name:"GettingStarted/Analytics/Step1"},onContinue:L},{default:$(()=>{var u,i;return[m(g,{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=p=>n.value=p),options:d.value,label:e.$t("label.adminLanguage"),description:e.$t("description.adminLanguage"),disabled:!((u=d.value)!=null&&u.length),"value-key":"value",clearable:!1},null,8,["modelValue","options","label","description","disabled"]),m(g,{modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=p=>l.value=p),options:c.value,label:e.$t("label.clientLanguage"),description:e.$t("description.clientLanguage"),disabled:!((i=c.value)!=null&&i.length),"value-key":"value",clearable:!1},null,8,["modelValue","options","label","description","disabled"])]}),_:1},8,["group","group-step","title","description"])}}};export{E as default};
