'use client'; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { MENU_SAFEZONE_TIMEOUT_EVENT: function() { return MENU_SAFEZONE_TIMEOUT_EVENT; }, useOnMenuSafeZoneTimeout: function() { return useOnMenuSafeZoneTimeout; } }); const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard"); const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react")); const MENU_SAFEZONE_TIMEOUT_EVENT = 'fuimenusafezonetimeout'; const useOnMenuSafeZoneTimeout = (listener)=>{ const elementRef = _react.useRef(null); return _react.useCallback((element)=>{ var _elementRef_current; (_elementRef_current = elementRef.current) === null || _elementRef_current === void 0 ? void 0 : _elementRef_current.removeEventListener(MENU_SAFEZONE_TIMEOUT_EVENT, listener); element === null || element === void 0 ? void 0 : element.addEventListener(MENU_SAFEZONE_TIMEOUT_EVENT, listener); elementRef.current = element; }, [ listener ]); };