import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{ct as n}from"./Tooltip.CcubhKj6.js";import{a as r,i,n as a,r as o}from"./useFocusRing.DKgtHVTa.js";var s=e(t(),1),c=s.createContext(null);function l(e){let t=(0,s.useContext)(c)||{};a(t,e);let{ref:n,...r}=t;return r}function u(e,t){let{focusProps:a}=i(e),{keyboardProps:c}=o(e),u=n(a,c),d=l(t),f=e.isDisabled?{}:d,p=(0,s.useRef)(e.autoFocus);(0,s.useEffect)(()=>{p.current&&t.current&&r(t.current),p.current=!1},[t]);let m=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(m=void 0),{focusableProps:n({...u,tabIndex:m},f)}}export{c as n,u as t};