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