import React from "react";
import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
import type * as WPDS from "../theme";

const NAME = "NavigationMenuRoot";

export type NavigationMenuRootProps = {
  /** Any React node may be used as a child to allow for formatting */
  children?: React.ReactNode;
  /** Override CSS */
  css?: WPDS.CSS;
} & React.ComponentPropsWithRef<typeof NavigationMenuPrimitive.Root>;

export const NavigationMenuRoot = React.forwardRef<
  HTMLDivElement,
  NavigationMenuRootProps
>(({ children, ...props }, ref) => {
  return (
    <NavigationMenuPrimitive.Root {...props} ref={ref}>
      {children}
    </NavigationMenuPrimitive.Root>
  );
});

NavigationMenuRoot.displayName = NAME;
