"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const clsx = require("clsx");
require("react");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const useRandomClassname = require("../../../core/Box/use-random-classname/use-random-classname.cjs");
const Box = require("../../../core/Box/Box.cjs");
const factory = require("../../../core/factory/factory.cjs");
const Grid_context = require("../Grid.context.cjs");
const GridColVariables = require("./GridColVariables.cjs");
const Grid_module_css = require("../Grid.module.css.cjs");
const defaultProps = {
  span: 12
};
const GridCol = factory.factory((_props, ref) => {
  const props = useProps.useProps("GridCol", defaultProps, _props);
  const { classNames, className, style, styles, vars, span, order, offset, ...others } = props;
  const ctx = Grid_context.useGridContext();
  const responsiveClassName = useRandomClassname.useRandomClassName();
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
    /* @__PURE__ */ jsxRuntime.jsx(
      GridColVariables.GridColVariables,
      {
        selector: `.${responsiveClassName}`,
        span,
        order,
        offset
      }
    ),
    /* @__PURE__ */ jsxRuntime.jsx(
      Box.Box,
      {
        ref,
        ...ctx.getStyles("col", {
          className: clsx(className, responsiveClassName),
          style,
          classNames,
          styles
        }),
        ...others
      }
    )
  ] });
});
GridCol.classes = Grid_module_css.default;
GridCol.displayName = "@mantine/core/GridCol";
exports.GridCol = GridCol;
