"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
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 AspectRatio_module_css = require("./AspectRatio.module.css.cjs");
const defaultProps = {};
const varsResolver = createVarsResolver.createVarsResolver((_, { ratio }) => ({
  root: {
    "--ar-ratio": ratio == null ? void 0 : ratio.toString()
  }
}));
const AspectRatio = factory.factory((_props, ref) => {
  const props = useProps.useProps("AspectRatio", defaultProps, _props);
  const { classNames, className, style, styles, unstyled, vars, ratio, ...others } = props;
  const getStyles = useStyles.useStyles({
    name: "AspectRatio",
    classes: AspectRatio_module_css.default,
    props,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver
  });
  return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ref, ...getStyles("root"), ...others });
});
AspectRatio.classes = AspectRatio_module_css.default;
AspectRatio.displayName = "@mantine/core/AspectRatio";
exports.AspectRatio = AspectRatio;
