import { cn } from "./cva.js";
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { jsx } from "react/jsx-runtime";
//#region src/ScrollArea.tsx
const ScrollArea = React.forwardRef(({ asChild, className, gap = "4", style, ...props }, ref) => {
	const Comp = asChild ? Slot : "div";
	const scrollStyle = {
		"--scroll-gap": `var(--mod-space-${gap})`,
		minWidth: 0,
		overflow: "auto",
		paddingBlock: "var(--scroll-gap)",
		paddingInline: "var(--scroll-gap)",
		...style
	};
	return /* @__PURE__ */ jsx(Comp, {
		ref,
		className: cn("@container block min-w-0", className),
		style: scrollStyle,
		...props
	});
});
ScrollArea.displayName = "ScrollArea";
//#endregion
export { ScrollArea };
