"use client";
const require_get_size = require("../../../core/utils/get-size/get-size.cjs");
const require_create_vars_resolver = require("../../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
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_factory = require("../../../core/factory/factory.cjs");
const require_Box = require("../../../core/Box/Box.cjs");
const require_PillsInput_context = require("../../PillsInput/PillsInput.context.cjs");
const require_Pill_module = require("../Pill.module.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/Pill/PillGroup/PillGroup.tsx
const PillGroupContext = (0, react.createContext)(null);
const varsResolver = require_create_vars_resolver.createVarsResolver((_, { gap }, { size }) => ({ group: { "--pg-gap": gap !== void 0 ? require_get_size.getSize(gap) : require_get_size.getSize(size, "pg-gap") } }));
const PillGroup = require_factory.factory((_props) => {
	const props = require_use_props.useProps("PillGroup", null, _props);
	const { classNames, className, style, styles, unstyled, vars, size, disabled, attributes, ...others } = props;
	const _size = (0, react.use)(require_PillsInput_context.PillsInputContext)?.size || size || void 0;
	const getStyles = require_use_styles.useStyles({
		name: "PillGroup",
		classes: require_Pill_module.default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		vars,
		varsResolver,
		stylesCtx: { size: _size },
		rootSelector: "group"
	});
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PillGroupContext, {
		value: {
			size: _size,
			disabled
		},
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
			size: _size,
			...getStyles("group"),
			...others
		})
	});
});
PillGroup.classes = require_Pill_module.default;
PillGroup.varsResolver = varsResolver;
PillGroup.displayName = "@mantine/core/PillGroup";
//#endregion
exports.PillGroup = PillGroup;
exports.PillGroupContext = PillGroupContext;

//# sourceMappingURL=PillGroup.cjs.map