import { type Accessor, createContext, useContext } from "solid-js"; export interface ComboboxChipContextValue { index: Accessor; } export const ComboboxChipContext = createContext(null); export function useComboboxChipContext(): ComboboxChipContextValue { const ctx = useContext(ComboboxChipContext); if (ctx == null) { throw new Error( "Base UI: useComboboxChipContext must be used within a .", ); } return ctx; }