define(["exports","./../modules/tabbedview/videostab.js","./../modules/emby-elements/emby-itemscontainer/emby-itemscontainer.js","./../modules/emby-elements/emby-button/emby-button.js","./../modules/emby-elements/emby-scroller/emby-scroller.js","./../modules/common/globalize.js"],function(_exports,_videostab,_embyItemscontainer,_embyButton,_embyScroller,_globalize){function RecordingsTab(view,params,options){_videostab.default.call(this,view,params,options)}function initElements(instance){instance.view.querySelector(".btnCreateRecording").addEventListener("click",function(e){var instance=this;return require(["channelRecordingCreator"]).then(function(responses){return responses[0].createRecordingForChannel(null,{serverId:instance.apiClient.serverId(),positionTo:e.target.closest("button")})})}.bind(instance))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(RecordingsTab.prototype,_videostab.default.prototype),RecordingsTab.prototype.getApiClientQueryMethodName=function(){return"getLiveTvRecordings"},RecordingsTab.prototype.getCardOptions=function(items){var options=_videostab.default.prototype.getCardOptions.apply(this,arguments);return options.fields.push("ParentName"),options.fields.push("ChannelName"),options.fields.push("AirTime"),options.preferThumb="auto",options.showAirEndTime=!0,options},RecordingsTab.prototype.getListViewOptions=function(items){var options=_videostab.default.prototype.getListViewOptions.apply(this,arguments);return options.fields.unshift("ParentName"),options},RecordingsTab.prototype.getDefaultSorting=function(){return this.getDefaultSortingForField("DateCreated")||_videostab.default.prototype.getDefaultSorting.apply(this,arguments)},RecordingsTab.prototype.getSettingsKey=function(){return"livetvrecordings"},RecordingsTab.prototype.loadTemplate=function(){return this.loadItemsTemplate()},RecordingsTab.prototype.onTemplateLoaded=function(){_videostab.default.prototype.onTemplateLoaded.apply(this,arguments);var elem=this.view.querySelector(".listTotalRecordCount"),html=(html=(html="")+'<button is="emby-button" class="btnCreateRecording raised raised-mini listTextButton-autohide">'+'<i class="md-icon button-icon button-icon-left">&#xE145;</i>')+("<span>"+_globalize.default.translate("HeaderAddRecording")+"</span>");elem.insertAdjacentHTML("afterend",html+="</button>"),initElements(this),this.itemsContainer.setAttribute("data-monitor","RecordingStarted,RecordingEnded")};_exports.default=RecordingsTab});