import "../../../chunks/chunk.QU3DSPNU.js";
import { createElement, useRef } from "react";
import { GdsCheckboxGroup as GdsCheckboxGroupClass } from "../../../components/checkbox/checkbox-group/checkbox-group.component.js";
import { getReactComponent, useControlledValue } from "../../../utils/react.js";
const GdsCheckboxGroup = (props) => {
  GdsCheckboxGroupClass.define();
  const JSXElement = getReactComponent("gds-checkbox-group");
  const internalRef = useRef(null);
  const ref = props.ref || internalRef;
  useControlledValue(
    ref,
    props.value,
    props.defaultValue,
    props.onChange,
    props.onInput
  );
  const { onChange, onInput, ref: _ref, ...restProps } = props;
  const propsWithClass = { ...restProps, class: props.className, ref };
  return createElement(JSXElement, propsWithClass);
};
GdsCheckboxGroup.displayName = "GdsCheckboxGroup";
export {
  GdsCheckboxGroup
};
