"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../core/MantineProvider/use-props/use-props.cjs");
const useStyles = require("../../core/styles-api/use-styles/use-styles.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 SimpleGridVariables = require("./SimpleGridVariables.cjs");
const SimpleGrid_module_css = require("./SimpleGrid.module.css.cjs");
const defaultProps = {
  cols: 1,
  spacing: "md",
  type: "media"
};
const SimpleGrid = factory.factory((_props, ref) => {
  const props = useProps.useProps("SimpleGrid", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    unstyled,
    vars,
    cols,
    verticalSpacing,
    spacing,
    type,
    ...others
  } = props;
  const getStyles = useStyles.useStyles({
    name: "SimpleGrid",
    classes: SimpleGrid_module_css.default,
    props,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars
  });
  const responsiveClassName = useRandomClassname.useRandomClassName();
  if (type === "container") {
    return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
      /* @__PURE__ */ jsxRuntime.jsx(SimpleGridVariables.SimpleGridContainerVariables, { ...props, selector: `.${responsiveClassName}` }),
      /* @__PURE__ */ jsxRuntime.jsx("div", { ...getStyles("container"), children: /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ref, ...getStyles("root", { className: responsiveClassName }), ...others }) })
    ] });
  }
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
    /* @__PURE__ */ jsxRuntime.jsx(SimpleGridVariables.SimpleGridMediaVariables, { ...props, selector: `.${responsiveClassName}` }),
    /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ref, ...getStyles("root", { className: responsiveClassName }), ...others })
  ] });
});
SimpleGrid.classes = SimpleGrid_module_css.default;
SimpleGrid.displayName = "@mantine/core/SimpleGrid";
exports.SimpleGrid = SimpleGrid;
