define(["exports","./serversync.js","./../emby-apiclient/connectionmanager.js"],function(_exports,_serversync,_connectionmanager){function MultiServerSync(){}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,MultiServerSync.prototype.sync=function(options){return console.log("MultiServerSync.sync starting..."),function syncNext(servers,index,options){var server;return servers.length<=index?(console.log("MultiServerSync.sync complete"),Promise.resolve()):(server=servers[index],console.log("Creating ServerSync to server: "+server.Id),(new _serversync.default).sync(server,options).then(function(){return console.log("ServerSync succeeded to server: "+server.Id),syncNext(servers,index+1,options)},function(err){return console.log("ServerSync failed to server: "+server.Id+". "+err),syncNext(servers,index+1,options)}))}(_connectionmanager.default.getSavedServers(),0,options)};_exports.default=MultiServerSync});