define(["exports","./serversync.js"],function(_exports,_serversync){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_serversync=babelHelpers.interopRequireDefault(_serversync);var MultiServerSync=function(){function MultiServerSync(){babelHelpers.classCallCheck(this,MultiServerSync)}return babelHelpers.createClass(MultiServerSync,[{key:"sync",value:function(connectionManager,options){console.log("MultiServerSync.sync starting...");var servers=connectionManager.getSavedServers();return function syncNext(connectionManager,servers,index,options){if(servers.length<=index)return console.log("MultiServerSync.sync complete"),Promise.resolve();var server=servers[index];return console.log("Creating ServerSync to server: "+server.Id),(new _serversync.default).sync(connectionManager,server,options).then(function(){return console.log("ServerSync succeeded to server: "+server.Id),syncNext(connectionManager,servers,index+1,options)},function(err){return console.log("ServerSync failed to server: "+server.Id+". "+err),syncNext(connectionManager,servers,index+1,options)})}(connectionManager,servers,0,options)}}]),MultiServerSync}();_exports.default=MultiServerSync});