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/Grid.tsx
const columnsClass = {
	1: "grid-cols-1",
	2: "grid-cols-1 @md:grid-cols-2",
	3: "grid-cols-1 @md:grid-cols-2 @lg:grid-cols-3"
};
const Grid = React.forwardRef(({ asChild, className, gap = "4", columns = 3, style, ...props }, ref) => {
	const Comp = asChild ? Slot : "div";
	const gridStyle = {
		"--grid-gap": `var(--mod-space-${gap})`,
		gap: "var(--grid-gap)",
		minWidth: 0,
		...style
	};
	return /* @__PURE__ */ jsx(Comp, {
		ref,
		className: cn("@container grid min-w-0", columnsClass[columns], className),
		style: gridStyle,
		...props
	});
});
Grid.displayName = "Grid";
//#endregion
export { Grid };
