import connectionManager from"./../emby-apiclient/connectionmanager.js";function PhotoScreenSaver(){this.name="Photo Screen Saver",this.type="screensaver",this.id="photoscreensaver",this.supportsAnonymous=!1}function getItems(query){query=Object.assign({ImageTypes:"Primary",IncludeItemTypes:"Photo",SortBy:"Random",Recursive:!0,ImageTypeLimit:1},query);var apiClient=connectionManager.currentApiClient();return apiClient.getItems(apiClient.getCurrentUserId(),query)}PhotoScreenSaver.prototype.show=function(){if(!this.currentSlideshow){let instance=this;Emby.importModule("./modules/slideshow/slideshow.js").then(function(slideshow){instance.currentSlideshow||((slideshow=new slideshow({showTitle:!0,cover:!0,getItems:getItems,cardFields:["Name"],interactive:!1,autoplay:!0})).show(),instance.currentSlideshow=slideshow)})}},PhotoScreenSaver.prototype.hide=function(){var currentSlideshow=this.currentSlideshow;currentSlideshow&&(currentSlideshow.hide(),this.currentSlideshow=null)};export default PhotoScreenSaver;