define(["exports","./mediasync.js","./../emby-apiclient/connectionmanager.js"],function(_exports,_mediasync,_connectionmanager){function ServerSync(){}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,ServerSync.prototype.sync=function(server,options){return _connectionmanager.default.isLoggedIn(server.Id)?_connectionmanager.default.connectToServer(server,{updateDateLastAccessed:!1,enableWebSocket:!1,reportCapabilities:!1,enableAutomaticBitrateDetection:!1,autoLogin:"lastuser"}).then(function(result){return"SignedIn"===result.State?function(apiClient,options){return console.log("ServerSync.performSync to server: "+apiClient.serverId()),options=options||{},(new _mediasync.default).sync(apiClient,options)}(_connectionmanager.default.getApiClient(server.Id),options):(console.log("Unable to connect to server id: "+server.Id),Promise.reject())}):(console.log("Skipping sync to server "+server.Id+" because there is no saved authentication information."),Promise.resolve())};_exports.default=ServerSync});