import{d as v,c as h,o as c,g as u,h as e,w as t,F as x,c2 as C,u as n,c3 as w,t as f,c4 as B,c5 as A,bb as P,b as l,e as V,J as D,c6 as F,c7 as g,s as M}from"./index-562c8470.js";import{u as T}from"./usePageTitle-ad3dbf10.js";const j={class:"settings-block"},E=v({__name:"SettingsCodeBlock",props:{engineSettings:{}},setup(p){const s=p,o=h(()=>Object.entries(s.engineSettings));return(d,i)=>(c(),u("div",j,[e(n(w),{multiline:""},{default:t(()=>[(c(!0),u(x,null,C(o.value,(a,_)=>(c(),u("div",{key:_,class:"settings-block--code-line"},f(a[0])+": "+f(a[1]),1))),128))]),_:1})]))}});function H(){return B(A)}const N=v({__name:"Settings",async setup(p){let s,o;const d=[{text:"Settings"}],i=H(),[a,_]=([s,o]=P(()=>Promise.all([i.admin.getSettings(),i.admin.getVersion()])),s=await s,o(),s);return T("Settings"),(J,m)=>{const b=l("p-key-value"),S=l("p-theme-toggle"),r=l("p-label"),y=l("p-layout-default");return c(),V(y,{class:"settings"},{header:t(()=>[e(n(D),{crumbs:d},{actions:t(()=>[e(b,{class:"settings__version",label:"Version",value:n(_),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(F),{selected:n(g),"onUpdate:selected":m[0]||(m[0]=k=>M(g)?g.value=k:null)},null,8,["selected"])]),_:1}),e(r,{label:"Server Settings"},{default:t(()=>[e(E,{class:"settings__code-block","engine-settings":n(a)},null,8,["engine-settings"])]),_:1})]),_:1})}}});export{N as default};
