"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { useScrollAreaContext } from "./use-scroll-area-context.js";
import { ScrollAreaScrollbarProvider } from "./use-scroll-area-scrollbar-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/scroll-area/scroll-area-scrollbar.tsx
var splitScrollbarProps = createSplitProps();
var ScrollAreaScrollbar = forwardRef((props, ref) => {
	const [scrollbarProps, localProps] = splitScrollbarProps(props, ["orientation"]);
	const mergedProps = mergeProps(useScrollAreaContext().getScrollbarProps(scrollbarProps), localProps);
	return /* @__PURE__ */ jsx(ScrollAreaScrollbarProvider, {
		value: scrollbarProps,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
ScrollAreaScrollbar.displayName = "ScrollAreaScrollbar";
//#endregion
export { ScrollAreaScrollbar };
