/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { cx, getStyles } from "../../styles/styler.js";
import { DividerCore } from "./DividerCore.js";
import { forwardRef, useMemo } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/Divider/DividerInternal.tsx
const DividerInternal = forwardRef(function Divider({ variant = "primary", layerClassNames, ...props }, ref) {
	return /* @__PURE__ */ jsx(DividerCore, {
		ref,
		layerClassNames: useMemo(() => ({
			root: cx(variant !== "inherit" && getStyles({ dividerVariantRoot: variant }), layerClassNames?.root),
			text: cx(variant !== "inherit" ? getStyles({ dividerVariantLabel: variant }) : void 0, layerClassNames?.text),
			line: cx(variant !== "inherit" && getStyles({ dividerVariantLine: variant }), layerClassNames?.line)
		}), [
			layerClassNames?.line,
			layerClassNames?.root,
			layerClassNames?.text,
			variant
		]),
		...props
	});
});
DividerInternal.displayName = "DividerInternal";

//#endregion
export { DividerInternal };