(self.webpackChunk=self.webpackChunk||[]).push([[2494],{33267:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return c}}),r(48410);var a=r(6594),s=r(61097),i=r(17146),n=(r(74373),r(17734),r(51547),r(76543));function o(e,t,r,a){if(e){t.length?e.classList.remove("hide"):e.classList.add("hide");var n=e.querySelector(".recordingItems");a?(n.classList.add("scrollX"),n.classList.add("hiddenScrollX"),n.classList.remove("vertical-wrap")):(n.classList.remove("scrollX"),n.classList.remove("hiddenScrollX"),n.classList.add("vertical-wrap")),n.innerHTML=s.default.getCardsHtml(Object.assign({items:t,shape:a?"autooverflow":"auto",defaultShape:a?"overflowBackdrop":"backdrop",showTitle:!0,showParentTitle:!0,coverImage:!0,cardLayout:!1,centerText:!0,allowBottomPadding:!a,preferThumb:"auto",overlayText:!1},r||{})),i.default.lazyChildren(n)}}function l(e){var t=this.getAttribute("data-type"),r=ApiClient.serverId();switch(t){case"latest":n.ZP.navigate("list.html?type=Recordings&serverId="+r)}}function c(e,t,r){function s(){return(new Date).getTime()-d>3e5}for(var i,c,d=0,u=r.querySelectorAll(".more"),h=0,f=u.length;h<f;h++)u[h].addEventListener("click",l);this.preRender=function(){s()&&(c=ApiClient.getLiveTvRecordings({UserId:n.ZP.getCurrentUserId(),Limit:12,Fields:"CanDelete,PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,EnableImageTypes:"Primary,Thumb,Backdrop"}),i=ApiClient.getRecordingFolders(n.ZP.getCurrentUserId()))},this.renderTab=function(){var e;s()&&(a.ZP.show(),e=r,c.then((function(t){o(e.querySelector("#latestRecordings"),t.Items,{showYear:!0,lines:2},!1),a.ZP.hide()})),function(e,t){t.then((function(t){o(e.querySelector("#recordingFolders"),t.Items,{showYear:!1,showParentTitle:!1},!1)}))}(r,i),d=(new Date).getTime())}}}}]);