export const __webpack_esm_id__=79064;export const __webpack_esm_ids__=[79064];export const __webpack_esm_modules__={79064(e,t,o){var n=o(22723),r=o(8981);function i(e){let t,o,i=!1;const a=()=>t,d=()=>i,s=e=>{if(!e)throw new Error("Invalid location");t.addToCluster(e),c()},u=e=>{if(!e)throw new Error("Invalid node");t.deleteFromCluster(e),c()},c=()=>{_(l.CLUSTER_VIEW_UPDATED,a())},_=(t,o)=>{e.emitSync(t,o)},C=(t,o)=>e.subscribeSync(t,e=>o(e));return{emit:_,subscribe:C,getClusterView:a,onClusterViewChanged:e=>(t&&angular.isFunction(e)&&e(a()),C(l.CLUSTER_VIEW_UPDATED,t=>e(t))),setClusterView:e=>{if(!e)return t=void 0,i=!1,void(o=void 0);t=new r.do((0,n.cloneDeep)(e)),c()},addLocation:s,updateClusterValidity:e=>{i=e,_(l.CLUSTER_VALID_UPDATED,d())},isValid:d,onClusterValidityChanged:e=>(t&&angular.isFunction(e)&&e(d()),C(l.CLUSTER_VALID_UPDATED,t=>e(t))),emitUpdateClusterView:c,deleteFromCluster:u,restoreNode:e=>{if(!e)throw new Error("Invalid node");t.restoreFromDeletion(e),c()},replace:(e,t)=>{u(e),s(t)},setPendingReplace:e=>{o=(0,n.cloneDeep)(e)},getPendingReplace:()=>o,getDeleteFromCluster:()=>t.getDeleteFromCluster(),getAvailable:()=>t.getAvailable(),getAvailableNodeEndpoints:()=>t.getAvailableNodeEndpoints(),getAttached:()=>t.getAttached(),hasValidNodesCount:()=>t.hasValidNodesCount(),canDeleteNode:()=>t.canDeleteNode(),findByEndpoint:(e,o)=>t.findByEndpoint(e,o),getLocalNode:()=>t.getLocalNode(),getViewModel:()=>t.getViewModel(),hasCluster:()=>t.hasCluster(),getClusterConfiguration:()=>t.getClusterConfiguration(),isChanged:()=>t.isChanged()}}angular.module("graphdb.framework.clustermanagement.services.cluster-context",[]).factory("ClusterContextService",i),i.$inject=["EventEmitterService"];const l={CLUSTER_VIEW_UPDATED:"cluster_view_updated",CLUSTER_VALID_UPDATED:"cluster_valid_updated"}}};
//# sourceMappingURL=79064.ab211d95468e32b7bdca.bundle.js.map