"use client";
import { l as e } from "./useRenderElement-CmuWsiNa.js";
import { n as t } from "./useCompositeListItem-xM6vOR9-.js";
import { r as n } from "./useButton-AXffhTAZ.js";
import * as r from "react";
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/internals/composite/item/useCompositeItem.js
function i(i = {}) {
	let { highlightItemOnHover: a, highlightedIndex: o, onHighlightedIndexChange: s } = n(), { ref: c, index: l } = t(i), u = o === l, d = r.useRef(null), f = e(c, d);
	return {
		compositeProps: r.useMemo(() => ({
			tabIndex: u ? 0 : -1,
			onFocus() {
				s(l);
			},
			onMouseMove() {
				let e = d.current;
				if (!a || !e) return;
				let t = e.hasAttribute("disabled") || e.ariaDisabled === "true";
				!u && !t && e.focus();
			}
		}), [
			u,
			s,
			l,
			a
		]),
		compositeRef: f,
		index: l
	};
}
//#endregion
export { i as t };
