"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 factory = require("../../../core/factory/factory.cjs");
const Progress_context = require("../Progress.context.cjs");
const Progress_module_css = require("../Progress.module.css.cjs");
const defaultProps = {};
const varsResolver = createVarsResolver.createVarsResolver(
  (_, { size, radius, transitionDuration }) => ({
    root: {
      "--progress-size": getSize.getSize(size, "progress-size"),
      "--progress-radius": radius === void 0 ? void 0 : getSize.getRadius(radius),
      "--progress-transition-duration": typeof transitionDuration === "number" ? `${transitionDuration}ms` : void 0
    }
  })
);
const ProgressRoot = factory.factory((_props, ref) => {
  const props = useProps.useProps("ProgressRoot", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    unstyled,
    vars,
    autoContrast,
    transitionDuration,
    ...others
  } = props;
  const getStyles = useStyles.useStyles({
    name: "Progress",
    classes: Progress_module_css.default,
    props,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver
  });
  return /* @__PURE__ */ jsxRuntime.jsx(Progress_context.ProgressProvider, { value: { getStyles, autoContrast }, children: /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ref, ...getStyles("root"), ...others }) });
});
ProgressRoot.classes = Progress_module_css.default;
ProgressRoot.displayName = "@mantine/core/ProgressRoot";
exports.ProgressRoot = ProgressRoot;
