import { createContext, useContext } from "solid-js";

/**
 * Context shared between `<Combobox.Chips>` and its descendant
 * `<Combobox.Chip>` / `<Combobox.ChipRemove>` parts. The context is
 * optional — the combobox can be rendered without chips (single-select),
 * so `useContext` returns `null` when there's no `<Combobox.Chips>`
 * ancestor. Callers that require it (Chip / ChipRemove) throw.
 */

export const ComboboxChipsContext = createContext(null);
export function useComboboxChipsContext() {
  return useContext(ComboboxChipsContext);
}
//# sourceMappingURL=chips-context.jsx.map
