"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { useNavigationMenuContext } from "./use-navigation-menu-context.js";
import { useNavigationMenuItemPropsContext } from "./use-navigation-menu-item-props-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-link.tsx
var splitLinkProps = createSplitProps();
var NavigationMenuLink = forwardRef((props, ref) => {
	const itemContext = useNavigationMenuItemPropsContext();
	const value = props.value ?? itemContext?.value;
	const [linkProps, localProps] = splitLinkProps({
		...props,
		value
	}, [
		"current",
		"onSelect",
		"value",
		"closeOnClick"
	]);
	const mergedProps = mergeProps(useNavigationMenuContext().getLinkProps(linkProps), localProps);
	return /* @__PURE__ */ jsx(ark.a, {
		...mergedProps,
		ref
	});
});
NavigationMenuLink.displayName = "NavigationMenuLink";
//#endregion
export { NavigationMenuLink };
