"use client";
const require_rem = require("../../core/utils/units-converters/rem.cjs");
const require_get_default_z_index = require("../../core/utils/get-default-z-index/get-default-z-index.cjs");
const require_get_size = require("../../core/utils/get-size/get-size.cjs");
const require_create_vars_resolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
const require_rgba = require("../../core/MantineProvider/color-functions/rgba/rgba.cjs");
const require_use_props = require("../../core/MantineProvider/use-props/use-props.cjs");
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
const require_polymorphic_factory = require("../../core/factory/polymorphic-factory.cjs");
const require_Box = require("../../core/Box/Box.cjs");
const require_Overlay_module = require("./Overlay.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Overlay/Overlay.tsx
const defaultProps = { zIndex: require_get_default_z_index.getDefaultZIndex("modal") };
const varsResolver = require_create_vars_resolver.createVarsResolver((_, { gradient, color, backgroundOpacity, blur, radius, zIndex }) => ({ root: {
	"--overlay-bg": gradient || (color !== void 0 || backgroundOpacity !== void 0) && require_rgba.rgba(color || "#000", backgroundOpacity ?? .6) || void 0,
	"--overlay-filter": blur ? `blur(${require_rem.rem(blur)})` : void 0,
	"--overlay-radius": radius === void 0 ? void 0 : require_get_size.getRadius(radius),
	"--overlay-z-index": zIndex?.toString()
} }));
const Overlay = require_polymorphic_factory.polymorphicFactory((_props) => {
	const props = require_use_props.useProps("Overlay", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, fixed, center, children, radius, zIndex, gradient, blur, color, backgroundOpacity, mod, attributes, ...others } = props;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...require_use_styles.useStyles({
			name: "Overlay",
			props,
			classes: require_Overlay_module.default,
			className,
			style,
			classNames,
			styles,
			unstyled,
			attributes,
			vars,
			varsResolver
		})("root"),
		mod: [{
			center,
			fixed
		}, mod],
		...others,
		children
	});
});
Overlay.classes = require_Overlay_module.default;
Overlay.varsResolver = varsResolver;
Overlay.displayName = "@mantine/core/Overlay";
//#endregion
exports.Overlay = Overlay;

//# sourceMappingURL=Overlay.cjs.map