"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_render_strategy = require("../../utils/render-strategy.cjs");
const require_factory = require("../factory.cjs");
const require_use_tabs_context = require("./use-tabs-context.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/tabs/tabs-root-provider.tsx
var splitRootProviderProps = require_create_split_props.createSplitProps();
var TabsRootProvider = (0, react.forwardRef)((props, ref) => {
	const [renderStrategyProps, tabsProps] = require_render_strategy.splitRenderStrategyProps(props);
	const [{ value: tabs }, localProps] = splitRootProviderProps(tabsProps, ["value"]);
	const mergedProps = (0, _zag_js_react.mergeProps)(tabs.getRootProps(), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_tabs_context.TabsProvider, {
		value: tabs,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_render_strategy.RenderStrategyPropsProvider, {
			value: renderStrategyProps,
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.div, {
				...mergedProps,
				ref
			})
		})
	});
});
TabsRootProvider.displayName = "TabsRootProvider";
//#endregion
exports.TabsRootProvider = TabsRootProvider;
