"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const rem = require("../../../core/utils/units-converters/rem.cjs");
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 InputWrapper_context = require("../InputWrapper.context.cjs");
const Input_module_css = require("../Input.module.css.cjs");
const defaultProps = {};
const varsResolver = createVarsResolver.createVarsResolver((_, { size }) => ({
  description: {
    "--input-description-size": size === void 0 ? void 0 : `calc(${getSize.getFontSize(size)} - ${rem.rem(2)})`
  }
}));
const InputDescription = factory.factory((_props, ref) => {
  const props = useProps.useProps("InputDescription", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    unstyled,
    vars,
    size,
    __staticSelector,
    __inheritStyles = true,
    variant,
    ...others
  } = useProps.useProps("InputDescription", defaultProps, props);
  const ctx = InputWrapper_context.useInputWrapperContext();
  const _getStyles = useStyles.useStyles({
    name: ["InputWrapper", __staticSelector],
    props,
    classes: Input_module_css.default,
    className,
    style,
    classNames,
    styles,
    unstyled,
    rootSelector: "description",
    vars,
    varsResolver
  });
  const getStyles = __inheritStyles && (ctx == null ? void 0 : ctx.getStyles) || _getStyles;
  return /* @__PURE__ */ jsxRuntime.jsx(
    Box.Box,
    {
      component: "p",
      ref,
      variant,
      size,
      ...getStyles("description", (ctx == null ? void 0 : ctx.getStyles) ? { className, style } : void 0),
      ...others
    }
  );
});
InputDescription.classes = Input_module_css.default;
InputDescription.displayName = "@mantine/core/InputDescription";
exports.InputDescription = InputDescription;
