import formatErrorMessage from "../../../../utils/esm/formatErrorMessage.js";
import * as React from "react";
const ComboboxRootContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") ComboboxRootContext.displayName = "ComboboxRootContext";
const ComboboxFloatingContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") ComboboxFloatingContext.displayName = "ComboboxFloatingContext";
const ComboboxDerivedItemsContext = /* @__PURE__ */ React.createContext(void 0);
if (process.env.NODE_ENV !== "production") ComboboxDerivedItemsContext.displayName = "ComboboxDerivedItemsContext";
const ComboboxInputValueContext = /* @__PURE__ */ React.createContext("");
if (process.env.NODE_ENV !== "production") ComboboxInputValueContext.displayName = "ComboboxInputValueContext";
function useComboboxRootContext() {
  const context = React.useContext(ComboboxRootContext);
  if (!context) {
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxRootContext is missing. Combobox parts must be placed within <Combobox.Root>." : formatErrorMessage(22));
  }
  return context;
}
function useComboboxFloatingContext() {
  const context = React.useContext(ComboboxFloatingContext);
  if (!context) {
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxFloatingContext is missing. Combobox parts must be placed within <Combobox.Root>." : formatErrorMessage(23));
  }
  return context;
}
function useComboboxDerivedItemsContext() {
  const context = React.useContext(ComboboxDerivedItemsContext);
  if (!context) {
    throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: ComboboxItemsContext is missing. Combobox parts must be placed within <Combobox.Root>." : formatErrorMessage(24));
  }
  return context;
}
function useComboboxInputValueContext() {
  return React.useContext(ComboboxInputValueContext);
}
export {
  ComboboxDerivedItemsContext,
  ComboboxFloatingContext,
  ComboboxInputValueContext,
  ComboboxRootContext,
  useComboboxDerivedItemsContext,
  useComboboxFloatingContext,
  useComboboxInputValueContext,
  useComboboxRootContext
};
//# sourceMappingURL=ComboboxRootContext.js.map
