// Metro module 367 (f368). import _classCallCheck from "./_classCallCheck"; import _createClass from "./_createClass"; import Module357 from "./Module357"; import Module38 from "./Module38"; let AnimatedNode; let env382 = {}; env382[3] = 1; env382[4] = () => { Module357.assertNativeAnimatedModule(); env382[4] = null; }; AnimatedNode = function AnimatedNode(a0) { _classCallCheck(this, AnimatedNode); this._platformConfig = void 0; this.__isNative = false; this.__nativeTag = void 0; this.__disableBatchingForNativeCreate = void 0; this.__debugID = void 0; this._listeners = new Map(); this.__disableBatchingForNativeCreate = a0?.unstable_disableBatchingForNativeCreate; }; export default _createClass(AnimatedNode, [{ key: "__attach", value: function __attach() {} }, { key: "__detach", value: function __detach() { this.removeAllListeners(); if (this.__isNative && this.__nativeTag != null) { Module357.API.dropAnimatedNode(this.__nativeTag); this.__nativeTag = void 0; } } }, { key: "__getValue", value: function __getValue() {} }, { key: "__getAnimatedValue", value: function __getAnimatedValue() { return this.__getValue(); } }, { key: "__addChild", value: function __addChild(a0) {} }, { key: "__removeChild", value: function __removeChild(a0) {} }, { key: "__getChildren", value: function __getChildren() { return []; } }, { key: "__makeNative", value: function __makeNative(a0) { Module38(this.__isNative, "This node cannot be made a \"native\" animated node"); this._platformConfig = a0; } }, { key: "addListener", value: function addListener(a0) { const r2 = String; const r6 = +env382[3]; env382[3] = r6 + 1; const r7 = r2(r6); this._listeners.set(r7, a0); return r7; } }, { key: "removeListener", value: function removeListener(a0) { this._listeners.delete(a0); } }, { key: "removeAllListeners", value: function removeAllListeners() { this._listeners.clear(); } }, { key: "hasListeners", value: function hasListeners() { return this._listeners.size > 0; } }, { key: "__onAnimatedValueUpdateReceived", value: function __onAnimatedValueUpdateReceived(a0, a1) { this.__callListeners(a0 + a1); } }, { key: "__callListeners", value: function __callListeners(a0) { let c23708_0 = { value: a0 }; this._listeners.forEach((_listener) => { _listener(c23708_0); }); } }, { key: "__getNativeTag", value: function __getNativeTag() { let __nativeTag = this.__nativeTag; if (__nativeTag == null) { if (env382[4] != null) { Module357.assertNativeAnimatedModule(); env382[4] = null; } Module38(this.__isNative, "Attempt to get native tag from node not marked as \"native\""); const __nativeTag2 = Module357.generateNewNodeTag(); this.__nativeTag = __nativeTag2; const r28 = this.__getNativeConfig(); if (this._platformConfig) { r28.platformConfig = this._platformConfig; } if (this.__disableBatchingForNativeCreate) { r28.disableBatchingForNativeCreate = true; } Module357.API.createAnimatedNode(__nativeTag2, r28); __nativeTag = __nativeTag2; } return __nativeTag; } }, { key: "__getNativeConfig", value: function __getNativeConfig() { throw new Error("This JS animated node type cannot be used as native animated node"); } }, { key: "__getPlatformConfig", value: function __getPlatformConfig() { return this._platformConfig; } }, { key: "__setPlatformConfig", value: function __setPlatformConfig(a0) { this._platformConfig = a0; } }, { key: "toJSON", value: function toJSON() { return this.__getValue(); } }, { key: "__getDebugID", value: function __getDebugID() {} }]);