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