define(["exports","./../modules/common/itemmanager/itemmanager.js","./../modules/common/itemmanager/baseitemcontroller.js","./../modules/emby-apiclient/connectionmanager.js","./../modules/common/globalize.js","./notificationeditor.js","./../modules/common/pluginmanager.js"],function(_exports,_itemmanager,_baseitemcontroller,_connectionmanager,_globalize,_notificationeditor,_pluginmanager){function UserNotificationController(){_baseitemcontroller.default.apply(this,arguments)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,Object.assign(UserNotificationController.prototype,_baseitemcontroller.default.prototype),UserNotificationController.prototype.getTypeNames=function(){return["UserNotification"]},UserNotificationController.prototype.getDisplayName=function(item,options){return item.FriendlyName||item.ServiceName},UserNotificationController.prototype.isSingleItemFetchRequired=function(typeName){return!1},UserNotificationController.prototype.getDefaultIcon=function(item){return"&#xe7f4;"},UserNotificationController.prototype.canDelete=function(item,user){return!0},UserNotificationController.prototype.enableLibraryItemDeleteConfirmation=function(){return!1},UserNotificationController.prototype.canRefreshMetadata=function(item,user){return!1},UserNotificationController.prototype.getNameSortOption=function(itemType){return null},UserNotificationController.prototype.canAddToPlaylist=function(item){return!1},UserNotificationController.prototype.canAddToCollection=function(item,user){return!1},UserNotificationController.prototype.canConvert=function(item,user){return!1},UserNotificationController.prototype.canEdit=function(items,user){return 1===items.length},UserNotificationController.prototype.canRate=function(item){return!1},UserNotificationController.prototype.canMarkPlayed=function(item){return!1},UserNotificationController.prototype.canEditImages=function(item,user){return!1},UserNotificationController.prototype.canEditSubtitles=function(item,user){return!1},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});