"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/animation-state.mjs.js"),n=require("../../../../../../motion-dom/dist/es/render/utils/is-animation-controls.mjs.js");class o extends t.Feature{constructor(t){super(t),t.animationState||(t.animationState=e.createAnimationState(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();n.isAnimationControls(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}exports.AnimationFeature=o;
//# sourceMappingURL=index.mjs.js.map
