import{d as b,c as x,o as i,j as u,n as e,w as t,F as C,bO as h,g as n,bP as B,t as f,bQ as w,bR as P,aX as A,a as l,f as T,bq as V,bS as j,bT as g,v as D}from"./index-18beffd6.js";import{u as F}from"./usePageTitle-5c97edcb.js";const K={class:"settings-block"},M=b({__name:"SettingsCodeBlock",props:{engineSettings:{}},setup(p){const s=p,a=x(()=>Object.entries(s.engineSettings));return(d,_)=>(i(),u("div",K,[e(n(B),{multiline:""},{default:t(()=>[(i(!0),u(C,null,h(a.value,(o,c)=>(i(),u("div",{key:c,class:"settings-block--code-line"},f(o[0])+": "+f(o[1]),1))),128))]),_:1})]))}});function O(){return w(P)}const I=b({__name:"Settings",async setup(p){let s,a;const d=[{text:"Settings"}],_=O(),[o,c]=([s,a]=A(()=>Promise.all([_.admin.getSettings(),_.admin.getVersion()])),s=await s,a(),s);return F("Settings"),(R,m)=>{const v=l("p-key-value"),S=l("p-theme-toggle"),r=l("p-label"),y=l("p-layout-default");return i(),T(y,{class:"settings"},{header:t(()=>[e(n(V),{crumbs:d},{actions:t(()=>[e(v,{class:"settings__version",label:"Version",value:n(c),alternate:""},null,8,["value"])]),_:1})]),default:t(()=>[e(r,{label:"Theme"},{default:t(()=>[e(S)]),_:1}),e(r,{label:"Color Mode",class:"settings__color-mode"},{default:t(()=>[e(n(j),{selected:n(g),"onUpdate:selected":m[0]||(m[0]=k=>D(g)?g.value=k:null)},null,8,["selected"])]),_:1}),e(r,{label:"Server Settings"},{default:t(()=>[e(M,{class:"settings__code-block","engine-settings":n(o)},null,8,["engine-settings"])]),_:1})]),_:1})}}});export{I as default};
