"use strict";var u=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var c=(r,e)=>u(r,"name",{value:e,configurable:true});var b=(r,e)=>{for(var s in e)u(r,s,{get:e[s],enumerable:true})};var E=(r,e,s,l)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let i of d(e))if(!I.call(r,i)&&i!==s)u(r,i,{get:()=>e[i],enumerable:!(l=t(e,i))||l.enumerable})}return r};var g=r=>E(u({},"__esModule",{value:true}),r);var h=(r,e,s,l)=>{var i=l>1?void 0:l?t(e,s):e;for(var v=r.length-1,f;v>=0;v--)if(f=r[v])i=(l?f(e,s,i):f(i))||i;if(l&&i)u(e,s,i);return i};var p={};b(p,{default:()=>n});module.exports=g(p);var o=require("mobx");var m=require("../../../config");class n{id=null;name=null;order=null;services=[];userId=null;constructor(e){if(!e.id){throw new Error("Workspace requires Id")}(0,o.makeObservable)(this);this.id=e.id;this.name=e.name;this.order=e.order;let{services:s}=e;if(e.saving&&Boolean(e.keepLoaded)){s.push(m.KEEP_WS_LOADED_USID)}else if(e.saving&&e.services.includes(m.KEEP_WS_LOADED_USID)){s=s.filter(l=>l!==m.KEEP_WS_LOADED_USID)}this.services.replace(s);this.userId=e.userId}}c(n,"Workspace");h([o.observable],n.prototype,"name",2);h([o.observable],n.prototype,"order",2);h([o.observable],n.prototype,"services",2);h([o.observable],n.prototype,"userId",2);
