"use client";
import { useRenderStrategyPropsContext } from "../../utils/render-strategy.js";
import { composeRefs } from "../../utils/compose-refs.js";
import { ark } from "../factory.js";
import { usePresence } from "../presence/use-presence.js";
import { PresenceProvider } from "../presence/use-presence-context.js";
import { useNavigationMenuContext } from "./use-navigation-menu-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/navigation-menu/navigation-menu-indicator.tsx
var NavigationMenuIndicator = forwardRef((props, ref) => {
	const navigationMenu = useNavigationMenuContext();
	const presence = usePresence({
		...useRenderStrategyPropsContext(),
		present: navigationMenu.open
	});
	const mergedProps = mergeProps(navigationMenu.getIndicatorProps(), presence.getPresenceProps(), props);
	return /* @__PURE__ */ jsx(PresenceProvider, {
		value: presence,
		children: presence.unmounted ? null : /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref: composeRefs(presence.ref, ref)
		})
	});
});
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
//#endregion
export { NavigationMenuIndicator };
