define(["cardBuilder","focusManager","emby-itemscontainer"],function(cardBuilder,focusManager){"use strict";return function(element,apiClient,parentId){var self=this;this.parentId=parentId,this.apiClient=apiClient,this.itemsContainer=element.querySelector(".itemsContainer"),this.itemsContainer.fetchData=function(){var apiClient=this.apiClient;return apiClient.getItems(apiClient.getCurrentUserId(),{ParentId:this.parentId,EnableImageTypes:"Primary,Backdrop,Thumb",SortBy:"SortName",Fields:"PrimaryImageAspectRatio,ProductionYear,CommunityRating",ImageTypeLimit:1})}.bind(this),this.itemsContainer.getListOptions=function(){return{renderer:cardBuilder,options:{shape:"auto",rows:{portrait:2,square:3,backdrop:3,fourThree:3},overlayText:!0,context:"folders",multiSelect:!1},virtualScrollLayout:"vertical-grid"}}.bind(this),self.resume=function(options){return self.itemsContainer.resume(options).then(function(){options.autoFocus&&focusManager.autoFocus(self.itemsContainer)})},self.pause=function(){self.itemsContainer.pause()},self.destroy=function(){this.itemsContainer=null,this.apiClient=null}}});