"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToggleButtonGroup = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const Tooltip_1 = require("../Tooltip");
const styles_1 = require("./styles");
const ToggleButtonGroupContext_1 = require("./ToggleButtonGroupContext");
exports.ToggleButtonGroup = (0, react_1.forwardRef)((props, ref) => {
    const { size = 'medium', isError, errorText, variant = 'transparent', ...restProps } = props;
    return ((0, jsx_runtime_1.jsx)(ToggleButtonGroupContext_1.ToggleButtonGroupContextProvider, { isError: isError, variant: variant, children: (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: isError && errorText, followCursor: true, arrow: false, children: (0, jsx_runtime_1.jsx)(styles_1.StyledToggleButtonGroup, { ref: ref, size: size, ...restProps, "$isError": isError }) }) }));
});
