"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
const getSize = require("../../core/utils/get-size/get-size.cjs");
const createVarsResolver = require("../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
require("clsx");
const useProps = require("../../core/MantineProvider/use-props/use-props.cjs");
const useStyles = require("../../core/styles-api/use-styles/use-styles.cjs");
const Box = require("../../core/Box/Box.cjs");
const polymorphicFactory = require("../../core/factory/polymorphic-factory.cjs");
const BackgroundImage_module_css = require("./BackgroundImage.module.css.cjs");
const defaultProps = {};
const varsResolver = createVarsResolver.createVarsResolver((_, { radius }) => ({
  root: { "--bi-radius": radius === void 0 ? void 0 : getSize.getRadius(radius) }
}));
const BackgroundImage = polymorphicFactory.polymorphicFactory((_props, ref) => {
  const props = useProps.useProps("BackgroundImage", defaultProps, _props);
  const { classNames, className, style, styles, unstyled, vars, radius, src, variant, ...others } = props;
  const getStyles = useStyles.useStyles({
    name: "BackgroundImage",
    props,
    classes: BackgroundImage_module_css.default,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver
  });
  return /* @__PURE__ */ jsxRuntime.jsx(
    Box.Box,
    {
      ref,
      variant,
      ...getStyles("root", { style: { backgroundImage: `url(${src})` } }),
      ...others
    }
  );
});
BackgroundImage.classes = BackgroundImage_module_css.default;
BackgroundImage.displayName = "@mantine/core/BackgroundImage";
exports.BackgroundImage = BackgroundImage;
