"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
const getSize = require("../../../core/utils/get-size/get-size.cjs");
const createVarsResolver = require("../../../core/styles-api/create-vars-resolver/create-vars-resolver.cjs");
require("clsx");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const useStyles = require("../../../core/styles-api/use-styles/use-styles.cjs");
const Box = require("../../../core/Box/Box.cjs");
const factory = require("../../../core/factory/factory.cjs");
const Button_module_css = require("../Button.module.css.cjs");
const defaultProps = {};
const varsResolver = createVarsResolver.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.getSize(size, "section-height"),
        "--section-padding-x": getSize.getSize(size, "section-padding-x"),
        "--section-fz": (size == null ? void 0 : size.includes("compact")) ? getSize.getFontSize(size.replace("compact-", "")) : getSize.getFontSize(size),
        "--section-radius": radius === void 0 ? void 0 : getSize.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.factory((_props, ref) => {
  const props = useProps.useProps("ButtonGroupSection", defaultProps, _props);
  const {
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    variant,
    gradient,
    radius,
    autoContrast,
    ...others
  } = useProps.useProps("ButtonGroupSection", defaultProps, _props);
  const getStyles = useStyles.useStyles({
    name: "ButtonGroupSection",
    props,
    classes: Button_module_css.default,
    className,
    style,
    classNames,
    styles,
    unstyled,
    vars,
    varsResolver,
    rootSelector: "groupSection"
  });
  return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ...getStyles("groupSection"), ref, variant, ...others });
});
ButtonGroupSection.classes = Button_module_css.default;
ButtonGroupSection.displayName = "@mantine/core/ButtonGroupSection";
exports.ButtonGroupSection = ButtonGroupSection;
