"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../motion-utils/dist/es/pipe.mjs.js"),s=require("../../../../motion-dom/dist/es/events/add-dom-event.mjs.js");class i extends t.Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=e.pipe(s.addDomEvent(this.node.current,"focus",(()=>this.onFocus())),s.addDomEvent(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}exports.FocusGesture=i;
//# sourceMappingURL=focus.mjs.js.map
