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