{"version":3,"names":["createContext","useContext","ComboboxChipsContext","useComboboxChipsContext"],"sources":["chips-context.ts"],"sourcesContent":["import { type Accessor, createContext, useContext } from \"solid-js\";\nimport type { MutableRef } from \"../../internals/floating-ui/types\";\n\n/**\n * Context shared between `<Combobox.Chips>` and its descendant\n * `<Combobox.Chip>` / `<Combobox.ChipRemove>` parts. The context is\n * optional — the combobox can be rendered without chips (single-select),\n * so `useContext` returns `null` when there's no `<Combobox.Chips>`\n * ancestor. Callers that require it (Chip / ChipRemove) throw.\n */\nexport interface ComboboxChipsContextValue {\n\thighlightedChipIndex: Accessor<number | undefined>;\n\tsetHighlightedChipIndex: (next: number | undefined) => void;\n\tchipsRef: MutableRef<Array<HTMLElement | null>>;\n}\n\nexport const ComboboxChipsContext =\n\tcreateContext<ComboboxChipsContextValue | null>(null);\n\nexport function useComboboxChipsContext(): ComboboxChipsContextValue | null {\n\treturn useContext(ComboboxChipsContext);\n}\n"],"mappings":"AAAA,SAAwBA,aAAa,EAAEC,UAAU,QAAQ,UAAU;;AAGnE;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAO,MAAMC,oBAAoB,GAChCF,aAAa,CAAmC,IAAI,CAAC;AAEtD,OAAO,SAASG,uBAAuBA,CAAA,EAAqC;EAC3E,OAAOF,UAAU,CAACC,oBAAoB,CAAC;AACxC","ignoreList":[]}