var p=Object.defineProperty;var n=(l,u)=>p(l,"name",{value:u,configurable:!0});import{d as V}from"./vendor-vue-CXt3ZZQ3.js";import{r as c,E as a}from"./vendor-other-CSX7WseZ.js";const O=V("serverConfig",()=>{const l=c({}),u=a(()=>Object.values(l.value)),s=a(()=>u.value.filter(e=>e.initialValue!==e.value)),i=n(()=>{for(const e of s.value)e.value=e.initialValue},"revertChanges"),d=a(()=>u.value.reduce((e,r)=>{const t=r.category?.[0]??"General";return e[t]=e[t]||[],e[t].push(r),e},{})),f=a(()=>Object.fromEntries(u.value.map(e=>[e.id,e.value===e.defaultValue||e.value===null||e.value===void 0?void 0:e.value]))),o=a(()=>{const e=Object.assign({},...u.value.map(r=>r.value===r.defaultValue||r.value===null||r.value===void 0?{}:r.getValue?r.getValue(r.value):{[r.id]:r.value}));return Object.fromEntries(Object.entries(e).map(([r,t])=>t===!0?[r,""]:[r,t.toString()]))}),m=a(()=>Object.entries(o.value).map(([e,r])=>[`--${e}`,r]).flat().filter(e=>e!=="").join(" "));function C(e,r){for(const t of e){const v=r[t.id]??t.defaultValue;l.value[t.id]={...t,value:v,initialValue:v}}}return n(C,"loadServerConfig"),{serverConfigById:l,serverConfigs:u,modifiedConfigs:s,serverConfigsByCategory:d,serverConfigValues:f,launchArgs:o,commandLineArgs:m,revertChanges:i,loadServerConfig:C}});export{O as u};
//# sourceMappingURL=serverConfigStore-trwJaF_M.js.map
