"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_navigation_menu_context = require("./use-navigation-menu-context.cjs");
const require_use_navigation_menu_item_props_context = require("./use-navigation-menu-item-props-context.cjs");
let _zag_js_utils = require("@zag-js/utils");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/navigation-menu/navigation-menu-trigger.tsx
var splitItemProps = require_create_split_props.createSplitProps();
var NavigationMenuTrigger = (0, react.forwardRef)((props, ref) => {
	const itemContext = require_use_navigation_menu_item_props_context.useNavigationMenuItemPropsContext();
	(0, _zag_js_utils.ensure)(itemContext, () => "NavigationMenu.Trigger must be used within NavigationMenu.Item");
	const value = itemContext.value;
	const disabled = props.disabled ?? itemContext.disabled;
	const [triggerProps, localProps] = splitItemProps({
		...props,
		value,
		disabled
	}, ["value", "disabled"]);
	const mergedProps = (0, _zag_js_react.mergeProps)(require_use_navigation_menu_context.useNavigationMenuContext().getTriggerProps(triggerProps), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.button, {
		...mergedProps,
		ref
	});
});
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
//#endregion
exports.NavigationMenuTrigger = NavigationMenuTrigger;
