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/Divider.tsx
const Divider = React.forwardRef(({ asChild, className, gap = "4", orientation = "horizontal", style, ...props }, ref) => {
	const Comp = asChild ? Slot : "div";
	const dividerStyle = {
		"--divider-gap": `var(--mod-space-${gap})`,
		backgroundColor: "var(--mod-color-border)",
		blockSize: orientation === "horizontal" ? "var(--mod-border-thin)" : "100%",
		inlineSize: orientation === "horizontal" ? "100%" : "var(--mod-border-thin)",
		marginBlock: orientation === "horizontal" ? "var(--divider-gap)" : void 0,
		marginInline: orientation === "vertical" ? "var(--divider-gap)" : void 0,
		minWidth: 0,
		...style
	};
	return /* @__PURE__ */ jsx(Comp, {
		ref,
		role: "separator",
		"aria-orientation": orientation,
		className: cn("@container shrink-0 self-stretch", className),
		style: dividerStyle,
		...props
	});
});
Divider.displayName = "Divider";
//#endregion
export { Divider };
