import { __spreadArray as f, __read as p } from "../../../../../tslib/tslib.es6.es.js";
import { SubscriptionManager as s } from "../../utils/subscription-manager.es.js";
var a = [
  "LayoutMeasure",
  "BeforeLayoutMeasure",
  "LayoutUpdate",
  "ViewportBoxUpdate",
  "Update",
  "Render",
  "AnimationComplete",
  "LayoutAnimationComplete",
  "AnimationStart",
  "LayoutAnimationStart",
  "SetAxisTarget",
  "Unmount"
];
function d() {
  var u = a.map(function() {
    return new s();
  }), i = {}, o = {
    clearAllListeners: function() {
      return u.forEach(function(t) {
        return t.clear();
      });
    },
    updatePropListeners: function(t) {
      a.forEach(function(e) {
        var r, n = "on" + e, c = t[n];
        (r = i[e]) === null || r === void 0 || r.call(i), c && (i[e] = o[n](c));
      });
    }
  };
  return u.forEach(function(t, e) {
    o["on" + a[e]] = function(r) {
      return t.add(r);
    }, o["notify" + a[e]] = function() {
      for (var r = [], n = 0; n < arguments.length; n++)
        r[n] = arguments[n];
      return t.notify.apply(t, f([], p(r), !1));
    };
  }), o;
}
export {
  d as createLifecycles
};
//# sourceMappingURL=lifecycles.es.js.map
