"use client";
import { getRadius } from "../../core/utils/get-size/get-size.mjs";
import { createVarsResolver } from "../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { useStyles } from "../../core/styles-api/use-styles/use-styles.mjs";
import { polymorphicFactory } from "../../core/factory/polymorphic-factory.mjs";
import { Box } from "../../core/Box/Box.mjs";
import BackgroundImage_module_default from "./BackgroundImage.module.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/BackgroundImage/BackgroundImage.tsx
const varsResolver = createVarsResolver((_, { radius }) => ({ root: { "--bi-radius": radius === void 0 ? void 0 : getRadius(radius) } }));
const BackgroundImage = polymorphicFactory((_props) => {
	const props = useProps("BackgroundImage", null, _props);
	const { classNames, className, style, styles, unstyled, vars, radius, src, variant, attributes, ...others } = props;
	return /* @__PURE__ */ jsx(Box, {
		variant,
		...useStyles({
			name: "BackgroundImage",
			props,
			classes: BackgroundImage_module_default,
			className,
			style,
			classNames,
			styles,
			unstyled,
			attributes,
			vars,
			varsResolver
		})("root", { style: { backgroundImage: `url(${src})` } }),
		...others
	});
});
BackgroundImage.classes = BackgroundImage_module_default;
BackgroundImage.varsResolver = varsResolver;
BackgroundImage.displayName = "@mantine/core/BackgroundImage";
//#endregion
export { BackgroundImage };

//# sourceMappingURL=BackgroundImage.mjs.map