"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { CarouselProvider } from "./use-carousel-context.js";
import { useCarousel } from "./use-carousel.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/carousel/carousel-root.tsx
var splitRootProps = createSplitProps();
var CarouselRoot = forwardRef((props, ref) => {
	const [useCarouselProps, localProps] = splitRootProps(props, [
		"allowMouseDrag",
		"autoplay",
		"autoSize",
		"defaultPage",
		"id",
		"ids",
		"inViewThreshold",
		"loop",
		"onAutoplayStatusChange",
		"onDragStatusChange",
		"onPageChange",
		"orientation",
		"padding",
		"page",
		"slideCount",
		"slidesPerMove",
		"slidesPerPage",
		"snapType",
		"spacing",
		"translations"
	]);
	const carousel = useCarousel(useCarouselProps);
	const mergedProps = mergeProps(carousel.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(CarouselProvider, {
		value: carousel,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
CarouselRoot.displayName = "CarouselRoot";
//#endregion
export { CarouselRoot };
