/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { cx, getStyles } from "../styles/styler.js";
import { Box } from "./Box.js";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/components/Scrim.tsx
const Scrim = forwardRef(function Scrim({ className, style, variant = "default", position = "fixed", animateOpacity = false, ...props }, ref) {
	const rootVariantClass = getStyles({ scrimVariantRoot: variant });
	return /* @__PURE__ */ jsx(Box, {
		ref,
		display: "block",
		className: cx(position === "fixed" ? "fixed" : "absolute", "inset-0 z-40", animateOpacity ? "transition-opacity duration-150 motion-reduce:transition-none data-[enter]:opacity-100 [&:not([data-enter])]:opacity-0" : "opacity-100", "uds-bgBlurFallback", rootVariantClass, className),
		...props,
		style: {
			...style,
			backgroundColor: "rgb(var(--uds-scrim-background-color) / var(--uds-scrim-opacity))"
		}
	});
});
Scrim.displayName = "Scrim";
//#endregion
export { Scrim };
