"use client";
import { getFontSize, getRadius, getSize } 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 Button_module_default from "../Button.module.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/Button/ButtonGroupSection/ButtonGroupSection.tsx
const varsResolver = createVarsResolver((theme, { radius, color, gradient, variant, autoContrast, size }) => {
	const colors = theme.variantColorResolver({
		color: color || theme.primaryColor,
		theme,
		gradient,
		variant: variant || "filled",
		autoContrast
	});
	return { groupSection: {
		"--section-height": getSize(size, "section-height"),
		"--section-padding-x": getSize(size, "section-padding-x"),
		"--section-fz": size?.includes("compact") ? getFontSize(size.replace("compact-", "")) : getFontSize(size),
		"--section-radius": radius === void 0 ? void 0 : getRadius(radius),
		"--section-bg": color || variant ? colors.background : void 0,
		"--section-color": colors.color,
		"--section-bd": color || variant ? colors.border : void 0
	} };
});
const ButtonGroupSection = factory((_props) => {
	const props = useProps("ButtonGroupSection", null, _props);
	const { className, style, classNames, styles, unstyled, vars, gradient, radius, autoContrast, attributes, ...others } = props;
	return /* @__PURE__ */ jsx(Box, {
		...useStyles({
			name: "ButtonGroupSection",
			props,
			classes: Button_module_default,
			className,
			style,
			classNames,
			styles,
			unstyled,
			attributes,
			vars,
			varsResolver,
			rootSelector: "groupSection"
		})("groupSection"),
		...others
	});
});
ButtonGroupSection.classes = Button_module_default;
ButtonGroupSection.varsResolver = varsResolver;
ButtonGroupSection.displayName = "@mantine/core/ButtonGroupSection";
//#endregion
export { ButtonGroupSection };

//# sourceMappingURL=ButtonGroupSection.mjs.map