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