"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2494],{33267:function(e,t,r){r.r(t),r.d(t,{default:function(){return c}}),r(48410);var a=r(56705),i=r(61097),s=r(21361),n=(r(74373),r(664),r(32420),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=i.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||{})),s.default.lazyChildren(n)}}function l(){var e=this.getAttribute("data-type"),t=ApiClient.serverId();"latest"===e&&n.ZP.navigate("list.html?type=Recordings&serverId="+t)}function c(e,t,r){function i(){return(new Date).getTime()-d>3e5}for(var s,c,d=0,u=r.querySelectorAll(".more"),h=0,f=u.length;h<f;h++)u[h].addEventListener("click",l);this.preRender=function(){i()&&(c=ApiClient.getLiveTvRecordings({UserId:n.ZP.getCurrentUserId(),Limit:12,Fields:"CanDelete,PrimaryImageAspectRatio,BasicSyncInfo",EnableTotalRecordCount:!1,EnableImageTypes:"Primary,Thumb,Backdrop"}),s=ApiClient.getRecordingFolders(n.ZP.getCurrentUserId()))},this.renderTab=function(){var e;i()&&(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,s),d=(new Date).getTime())}}}}]);