"use client";
const require_use_props = require("../../core/MantineProvider/use-props/use-props.cjs");
const require_use_styles = require("../../core/styles-api/use-styles/use-styles.cjs");
const require_use_random_classname = require("../../core/Box/use-random-classname/use-random-classname.cjs");
const require_factory = require("../../core/factory/factory.cjs");
const require_Box = require("../../core/Box/Box.cjs");
const require_SimpleGridVariables = require("./SimpleGridVariables.cjs");
const require_SimpleGrid_module = require("./SimpleGrid.module.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/SimpleGrid/SimpleGrid.tsx
const defaultProps = {
	cols: 1,
	spacing: "md",
	type: "media"
};
const SimpleGrid = require_factory.factory((_props) => {
	const props = require_use_props.useProps("SimpleGrid", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, cols, verticalSpacing, spacing, type, minColWidth, autoFlow, autoRows, attributes, ...others } = props;
	const getStyles = require_use_styles.useStyles({
		name: "SimpleGrid",
		classes: require_SimpleGrid_module.default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars
	});
	const responsiveClassName = require_use_random_classname.useRandomClassName();
	const autoColsAttr = minColWidth !== void 0 ? autoFlow || "auto-fill" : void 0;
	if (type === "container") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SimpleGridVariables.SimpleGridContainerVariables, {
		...props,
		selector: `.${responsiveClassName}`
	}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
		...getStyles("container"),
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
			...getStyles("root", { className: responsiveClassName }),
			...others,
			"data-auto-cols": autoColsAttr
		})
	})] });
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SimpleGridVariables.SimpleGridMediaVariables, {
		...props,
		selector: `.${responsiveClassName}`
	}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		...getStyles("root", { className: responsiveClassName }),
		...others,
		"data-auto-cols": autoColsAttr
	})] });
});
SimpleGrid.classes = require_SimpleGrid_module.default;
SimpleGrid.displayName = "@mantine/core/SimpleGrid";
//#endregion
exports.SimpleGrid = SimpleGrid;

//# sourceMappingURL=SimpleGrid.cjs.map