"use client";
import { getSpacing } from "../../../core/utils/get-size/get-size.mjs";
import { createVarsResolver } from "../../../core/styles-api/create-vars-resolver/create-vars-resolver.mjs";
import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs";
import { useStyles } from "../../../core/styles-api/use-styles/use-styles.mjs";
import { factory } from "../../../core/factory/factory.mjs";
import { Box } from "../../../core/Box/Box.mjs";
import Avatar_module_default from "../Avatar.module.mjs";
import { createContext } from "react";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Avatar/AvatarGroup/AvatarGroup.tsx
const AvatarGroupContext = createContext({ withinGroup: false });
const varsResolver = createVarsResolver((_, { spacing }) => ({ group: { "--ag-spacing": getSpacing(spacing) } }));
const AvatarGroup = factory((_props) => {
	const props = useProps("AvatarGroup", null, _props);
	const { classNames, className, style, styles, unstyled, vars, spacing, attributes, ...others } = props;
	return /* @__PURE__ */ jsx(AvatarGroupContext, {
		value: { withinGroup: true },
		children: /* @__PURE__ */ jsx(Box, {
			...useStyles({
				name: "AvatarGroup",
				classes: Avatar_module_default,
				props,
				className,
				style,
				classNames,
				styles,
				unstyled,
				attributes,
				vars,
				varsResolver,
				rootSelector: "group"
			})("group"),
			...others
		})
	});
});
AvatarGroup.classes = Avatar_module_default;
AvatarGroup.varsResolver = varsResolver;
AvatarGroup.displayName = "@mantine/core/AvatarGroup";
//#endregion
export { AvatarGroup, AvatarGroupContext };

//# sourceMappingURL=AvatarGroup.mjs.map