define(["exports","./../emby-apiclient/connectionmanager.js"],function(_exports,_connectionmanager){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;_exports.default=new function(){this.getImageUrl=function(serverId,itemId,options){return _connectionmanager.default.getApiClient({ServerId:serverId}).getImageUrl(itemId,options)},this.getSeriesImageUrl=function(item,options){return null==(item=this.getSeriesImageUrlInfo(item,options))?void 0:item.url},this.getSeriesImageUrlInfo=function(item,options){if(item)return"Episode"!==item.Type?null:((options=options||{}).type=options.type||"Primary","Primary"===options.type&&item.SeriesPrimaryImageTag?(options.tag=item.SeriesPrimaryImageTag,{url:_connectionmanager.default.getApiClient(item).getImageUrl(item.SeriesId,options),aspect:"2/3"}):"Thumb"===options.type&&item.ParentThumbImageTag?(options.tag=item.ParentThumbImageTag,{url:_connectionmanager.default.getApiClient(item).getImageUrl(item.ParentThumbItemId,options),aspect:"16/9"}):null);throw new Error("item cannot be null!")},this.getImageUrl=function(item,options){return null==(item=this.getImageUrlInfo(item,options))?void 0:item.url},this.getImageUrlInfo=function(item,options){if(item)return(options=options||{}).type=options.type||"Primary",item.ImageTags&&item.ImageTags[options.type]?(options.tag=item.ImageTags[options.type],{url:_connectionmanager.default.getApiClient(item).getImageUrl(item.PrimaryImageItemId||item.Id,options),aspect:item.PrimaryImageAspectRatio?item.PrimaryImageAspectRatio.toString():"1"}):item.AlbumId&&item.AlbumPrimaryImageTag?(options.tag=item.AlbumPrimaryImageTag,{url:_connectionmanager.default.getApiClient(item).getImageUrl(item.AlbumId,options),aspect:"1"}):null;throw new Error("item cannot be null!")}}});