"use strict";const p=require("./useFocus-9leARHB4.cjs.js"),o=require("./useFocusVisible-DfE3Z6QO.cjs.js"),h=require("./useFocusWithin-CX8GdFVw.cjs.js"),s=require("react");function x(r={}){let{autoFocus:a=!1,isTextInput:f,within:c}=r,e=s.useRef({isFocused:!1,isFocusVisible:a||o.$507fabe10e71c6fb$export$b9b3dfddab17db27()}),[n,b]=s.useState(!1),[d,l]=s.useState(()=>e.current.isFocused&&e.current.isFocusVisible),u=s.useCallback(()=>l(e.current.isFocused&&e.current.isFocusVisible),[]),i=s.useCallback(t=>{e.current.isFocused=t,b(t),u()},[u]);o.$507fabe10e71c6fb$export$ec71b4b83ac08ec3(t=>{e.current.isFocusVisible=t,u()},[],{isTextInput:f});let{focusProps:F}=p.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6({isDisabled:c,onFocusChange:i}),{focusWithinProps:$}=h.$9ab94262bd0047c7$export$420e68273165f4ec({isDisabled:!c,onFocusWithinChange:i});return{isFocused:n,isFocusVisible:d,focusProps:c?$:F}}exports.$f7dceffc5ad7768b$export$4e328f61c538687f=x;
//# sourceMappingURL=useFocusRing-B7_ogYbr.cjs.js.map
