"use client";
import * as React from "react";
import { useRenderElement } from "../../utils/useRenderElement.js";
import { NavigationMenuItemContext } from "./NavigationMenuItemContext.js";
import { useBaseUiId } from "../../utils/useBaseUiId.js";
import { jsx } from "react/jsx-runtime";
const NavigationMenuItem = /* @__PURE__ */ React.forwardRef(function NavigationMenuItem2(componentProps, forwardedRef) {
  const {
    className,
    render,
    value: valueProp,
    ...elementProps
  } = componentProps;
  const fallbackValue = useBaseUiId();
  const value = valueProp ?? fallbackValue;
  const element = useRenderElement("li", componentProps, {
    ref: forwardedRef,
    props: elementProps
  });
  const contextValue = React.useMemo(() => ({
    value
  }), [value]);
  return /* @__PURE__ */ jsx(NavigationMenuItemContext.Provider, {
    value: contextValue,
    children: element
  });
});
if (process.env.NODE_ENV !== "production") NavigationMenuItem.displayName = "NavigationMenuItem";
export {
  NavigationMenuItem
};
//# sourceMappingURL=NavigationMenuItem.js.map
