define(["exports","./../modules/listview/listview.js","./../modules/common/input/api.js","./../modules/emby-apiclient/events.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/emby-elements/emby-button/emby-button.js"],function(_exports,_listview,_api,_events,_connectionmanager,_embyButton){function getActivityListViewOptions(items){var options={moreButton:!1,action:"none",enableDefaultIcon:!0,overviewButton:!0,roundImage:!0,multiSelect:!1,contextMenu:!1,draggable:!1,draggableXActions:!1,fields:["Name","ShortOverview","Date"]};return _listview.default.setListOptions(items,options),{renderer:_listview.default,options:options,virtualScrollLayout:"vertical-list"}}function ActivityLog(options){var element=(this.options=options).element,options=(element.fetchData=function(){var limit=parseInt(this.getAttribute("data-activitylimit")||"7"),minDate=new Date,hasUserId=(minDate.setTime(minDate.getTime()-6048e5),"false"!==this.getAttribute("data-useractivity"));return ApiClient.getActivityLog({StartIndex:0,Limit:limit,MinDate:minDate.toISOString(),hasUserId:hasUserId,EnableTotalRecordCount:!1})}.bind(element),element.getListOptions=getActivityListViewOptions,element.parentContainer=element.closest(".activityContainer"),element.setAttribute("data-alwaysshowseeall","true"),_connectionmanager.default.getApiClient(options.serverId)),onUpdate=function(e,apiClient,data){var options=this.options;options&&options.serverId===apiClient.serverId()&&options.element.notifyRefreshNeeded()}.bind(this);this.updateFn=onUpdate,_events.default.on(_api.default,"ActivityLogEntry",onUpdate),options.startMessageListener("ActivityLogEntry","0,1500"),element.resume({refresh:!0})}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,ActivityLog.prototype.pause=function(){},ActivityLog.prototype.resume=function(options){},ActivityLog.prototype.destroy=function(){var options=this.options,options=(options&&_connectionmanager.default.getApiClient(options.serverId).stopMessageListener("ActivityLogEntry"),this.updateFn);options&&_events.default.off(_api.default,"ActivityLogEntry",options),this.items=null,this.options=null};_exports.default=ActivityLog});