"use client";
import formatErrorMessage from "../../../utils/esm/formatErrorMessage.js";
import * as React from "react";
const CheckboxGroupContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") CheckboxGroupContext.displayName = "CheckboxGroupContext";
function useCheckboxGroupContext(optional = true) {
  const context = React.useContext(CheckboxGroupContext);
  if (context === void 0 && !optional) {
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: CheckboxGroupContext is missing. CheckboxGroup parts must be placed within <CheckboxGroup>." : formatErrorMessage(3));
  }
  return context;
}
export {
  CheckboxGroupContext,
  useCheckboxGroupContext
};
//# sourceMappingURL=CheckboxGroupContext.js.map
