import{i as e,n as t}from"./jsx-runtime-DG_AJzB_.js";import{h as n,v as r}from"./createReactComponent-_L2mp4Ui.js";import{i}from"./CompositeList-DfjQy1zM.js";var a=e(t());function o(e={}){let{highlightItemOnHover:t,highlightedIndex:o,onHighlightedIndexChange:s}=r(),{ref:c,index:l}=i(e),u=o===l,d=a.useRef(null),f=n(c,d);return{compositeProps:a.useMemo(()=>({tabIndex:u?0:-1,onFocus(){s(l)},onMouseMove(){let e=d.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!u&&!n&&e.focus()}}),[u,s,l,t]),compositeRef:f,index:l}}export{o as t};