
var NotificationController = SingleModelController.createComponent("NotificationController");

NotificationController.defineAlias("model", "notification");

NotificationController.defineMethod("initView", function initView() {
  if (!this.view) return;

  this.view.classList.add("hidden");

  setElementProperty(this.view, "notification-id", this.notification.componentId);
});

NotificationController.defineMethod("updateView", function updateView() {
  if (!this.view) return;

  this.view.querySelectorAll("[data-ica-notification]").forEach(function (element) {
    element.textContent = this.notification[getElementProperty(element, "notification")];
  }.bind(this));

  this.view.classList.remove("hidden");
});

NotificationController.defineMethod("uninitView", function uninitView() {
  if (!this.view) return;

  removeElementProperty(this.view, "notification-id");
});

NotificationController.defineMethod("destroy", function destroy(destroyView = false) {
  // Destroy view
  if (destroyView && this.view) {
    var view = this.view,
      model = this.notification,
      jointModels = Object.values(this.notification.jointModels);
    new Waterfall(null, 300 + 1) // Leave time for transition to finish
      .then(function () {
        view.classList.add("hidden");
      }, 300 + 1)
      .then(function () {
        view.parentNode.removeChild(view);
        jointModels.forEach(function (jointModel) {
          jointModel.removeNotification(model);
          jointModel.didUpdate();
        });
      }.bind(this));
  }
  return [];
});

@@ -1160,74 +1160,8 @@
 all(
-null, 300 + 1) // Leave time for transition to finish%0A      .then(
 func
@@ -1162,34 +1162,32 @@
 l(function () %7B%0A
-  
       view.class
@@ -1210,18 +1210,16 @@
 %22);%0A    
-  
 %7D, 300 +
@@ -1252,51 +1252,8 @@
 ) %7B%0A
-        view.parentNode.removeChild(view);%0A
     
@@ -1394,16 +1394,59 @@
     %7D);%0A
+        view.parentNode.removeChild(view);%0A
       %7D.

Remove 300 ms additional delay