"use client";
import { getSize } from "../../core/utils/get-size/get-size.mjs";
import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
import { getThemeColor } from "../../core/MantineProvider/color-functions/get-theme-color/get-theme-color.mjs";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
import { factory } from "../../core/factory/factory.mjs";
import { Box } from "../../core/Box/Box.mjs";
import Divider_module_default from "./Divider.module.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Divider/Divider.tsx
const defaultProps = { orientation: "horizontal" };
const varsResolver = createVarsResolver((theme, { color, variant, size }) => ({ root: {
	"--divider-color": color ? getThemeColor(color, theme) : void 0,
	"--divider-border-style": variant,
	"--divider-size": getSize(size, "divider-size")
} }));
const Divider = factory((_props) => {
	const props = useProps("Divider", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, color, orientation, label, labelPosition, mod, attributes, ...others } = props;
	const getStyles = useStyles({
		name: "Divider",
		classes: Divider_module_default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver
	});
	return /* @__PURE__ */ jsx(Box, {
		mod: [{
			orientation,
			withLabel: !!label
		}, mod],
		role: "separator",
		...getStyles("root"),
		...others,
		children: label && /* @__PURE__ */ jsx(Box, {
			component: "span",
			mod: { position: labelPosition },
			...getStyles("label"),
			children: label
		})
	});
});
Divider.classes = Divider_module_default;
Divider.varsResolver = varsResolver;
Divider.displayName = "@mantine/core/Divider";
//#endregion
export { Divider };

//# sourceMappingURL=Divider.mjs.map