define(["../list/list","globalize","apphost","listViewStyle","emby-linkbutton","flexStyles","emby-toggle"],function(ListPage,globalize,appHost){"use strict";function onDebugOptionChanged(){var checked=this.checked;ApiClient.getServerConfiguration().then(function(config){config.EnableDebugLevelLogging=checked,ApiClient.updateServerConfiguration(config)})}function onViewShow(){var view=this;ApiClient.getServerConfiguration().then(function(config){view.querySelector(".chkDebugLog").checked=config.EnableDebugLevelLogging})}function LogsPage(view,params){params.serverId=ApiClient.serverId(),this.supportsPlayback=!1,this.enableAlphaNumericShortcuts=!1,ListPage.call(this,view,params),function(view){var html="";html+='<div class="readOnlyContent flex padded-top padded-left padded-left-page padded-right">',html+='<div class="checkboxContainer checkboxContainer-withDescription" style="margin-bottom:0;">',html+='<label style="width:auto;">',html+='<input type="checkbox" is="emby-toggle" class="chkDebugLog" />',html+="<span>"+globalize.translate("LabelEnableDebugLogging")+"</span>",html+="</label>",html+='<div class="fieldDescription toggleFieldDescription">'+globalize.translate("EnableDebugLoggingHelp")+"</div>",html+="</div>",html+="</div>",view.querySelector(".itemsViewSettingsContainer").insertAdjacentHTML("beforebegin",html)}(view),view.querySelector(".chkDebugLog").addEventListener("change",onDebugOptionChanged),view.addEventListener("viewbeforeshow",onViewShow)}return Object.assign(LogsPage.prototype,ListPage.prototype),LogsPage.prototype.getApiClientQueryMethodName=function(){return"getLogs"},LogsPage.prototype.getListViewOptions=function(items,settings){var options=ListPage.prototype.getListViewOptions.apply(this,arguments);return options.fields=["Name","DateModified"],options.image=!1,options.transparentIcon=!0,options.enableDefaultIcon=!0,options.moreButton=!1,options.downloadButton=appHost.supports("filedownload"),options.openInNewWindowButton=!0,options.action=ApiClient.isMinServerVersion("4.4.2")?"link":"none",options.multiSelect=!1,options},LogsPage.prototype.getCardOptions=function(items,settings){var options=ListPage.prototype.getCardOptions.apply(this,arguments);return options.action="openlink",options.showParentTitle=!1,options.fields=["Name","DateModified"],options.action=ApiClient.isMinServerVersion("4.4.2")?"link":"none",options.shape="backdrop",options.defaultBackground=!0,options.draggable=!1,options.multiSelect=!1,options},LogsPage.prototype.getSettingsKey=function(){return"logs"},LogsPage.prototype.setTitle=function(){},LogsPage.prototype.getSortMenuOptions=function(){return[]},LogsPage.prototype.getVisibleFilters=function(){return[]},LogsPage.prototype.getVisibleViewSettings=function(){return{settings:["imageType"],fields:[]}},LogsPage.prototype.getViewSettingDefaults=function(){var viewSettings=ListPage.prototype.getViewSettingDefaults.apply(this,arguments);return viewSettings.imageType="list",viewSettings},LogsPage.prototype.getItemCountText=function(numItems){return 1===numItems?globalize.translate("OneLog"):globalize.translate("LogCountValue",numItems)},LogsPage});