define(["exports","./../modules/common/itemmanager/itemmanager.js","./../modules/common/itemmanager/genericitemcontroller.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/common/globalize.js","./notificationeditor.js","./../modules/common/pluginmanager.js"],function(_exports,_itemmanager,_genericitemcontroller,_connectionmanager,_globalize,_notificationeditor,_pluginmanager){function UserNotificationController(){_genericitemcontroller.default.apply(this,arguments)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(UserNotificationController.prototype,_genericitemcontroller.default.prototype),UserNotificationController.prototype.getTypeNames=function(){return["UserNotification"]},UserNotificationController.prototype.getDisplayName=function(item,options){return item.FriendlyName||item.ServiceName},UserNotificationController.prototype.getDefaultIcon=function(item){return"&#xe7f4;"},UserNotificationController.prototype.canDelete=function(item,user){return!0},UserNotificationController.prototype.canEdit=function(items,user){return 1===items.length},UserNotificationController.prototype.isDeletePrimaryCommand=function(itemType){return!0},UserNotificationController.prototype.getDeleteMessages=function(){return{single:{text:"DeleteNotificationConfirmation",title:_globalize.default.translate("DeleteNotification"),confirmText:_globalize.default.translate("Delete")},plural:{text:"DeleteNotificationConfirmation",title:_globalize.default.translate("DeleteNotification"),confirmText:_globalize.default.translate("Delete")}}},UserNotificationController.prototype.deleteItemsInternal=function(options){var item=options.items[0];return _connectionmanager.default.getApiClient(item).deleteUserNotifications(options.items)},UserNotificationController.prototype.editItems=function(items,options){var item=items[0],apiClient=_connectionmanager.default.getApiClient(item);return apiClient.getNotificationTypes({userId:item.UserId}).then(function(allEventTypes){return require([(url=item.SetupModuleUrl,_pluginmanager.default.getConfigurationResourceUrl(url))]).then(function(responses){responses=responses[0],responses=responses.setFormValues?responses:new responses({apiClient:apiClient});return(new _notificationeditor.default).show({entry:item,apiClient:apiClient,eventTypes:allEventTypes,entryFormEditor:responses,userId:item.UserId})});var url})};var instance=new UserNotificationController;_itemmanager.default.registerItemController(instance),_exports.default=instance});