"use strict";const l=require("./focusSafely-k5Q6M5_H.cjs.js"),p=require("./useFocus-DR1VtW2A.cjs.js"),i=require("./mergeProps-DD8aR8go.cjs.js"),x=require("./useObjectRef-4v2MxSjQ.cjs.js"),P=require("./useSyncRef-BmnO4TYD.cjs.js"),f=require("react");function $(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function b(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:$(e.onKeyDown),onKeyUp:$(e.onKeyUp)}}}let u=f.createContext(null);function v(e){let t=f.useContext(u)||{};P.$e7801be82b4b2a53$export$4debdb1a3f0fa79e(t,e);let{ref:r,...o}=t;return o}const D=f.forwardRef(function(t,r){let{children:o,...n}=t,a=x.$df56164dff5785e2$export$4338b53315abf666(r),c={...n,ref:a};return f.createElement(u.Provider,{value:c},o)});function y(e,t){let{focusProps:r}=p.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6(e),{keyboardProps:o}=b(e),n=i.$3ef42575df84b30b$export$9d1611c77c2fe928(r,o),a=v(t),c=e.isDisabled?{}:a,d=f.useRef(e.autoFocus);f.useEffect(()=>{d.current&&t.current&&l.$3ad3f6e1647bc98d$export$80f3e147d781571c(t.current),d.current=!1},[t]);let s=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(s=void 0),{focusableProps:i.$3ef42575df84b30b$export$9d1611c77c2fe928({...n,tabIndex:s},c)}}exports.$46d819fcbaf35654$export$8f71654801c2f7cd=b;exports.$f645667febf57a63$export$13f3202a3e5ddd5=D;exports.$f645667febf57a63$export$4c014de7c8940b4c=y;exports.$f645667febf57a63$export$f9762fab77588ecb=u;
//# sourceMappingURL=useFocusable-HmbZyg7l.cjs.js.map
