"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const types = require("../render/utils/types.js");
const useDomEvent = require("../events/use-dom-event.js");
function useFocusGesture(_a) {
  var whileFocus = _a.whileFocus, visualElement = _a.visualElement;
  var onFocus = function() {
    var _a2;
    (_a2 = visualElement.animationState) === null || _a2 === void 0 ? void 0 : _a2.setActive(types.AnimationType.Focus, true);
  };
  var onBlur = function() {
    var _a2;
    (_a2 = visualElement.animationState) === null || _a2 === void 0 ? void 0 : _a2.setActive(types.AnimationType.Focus, false);
  };
  useDomEvent.useDomEvent(visualElement, "focus", whileFocus ? onFocus : void 0);
  useDomEvent.useDomEvent(visualElement, "blur", whileFocus ? onBlur : void 0);
}
exports.useFocusGesture = useFocusGesture;
//# sourceMappingURL=use-focus-gesture.js.map
