import { type Accessor, createContext, useContext } from "solid-js"; export interface SelectGroupContextValue { labelId: Accessor; setLabelId: (id: string | undefined) => void; } export const SelectGroupContext = createContext( null, ); export function useSelectGroupContext(): SelectGroupContextValue { const v = useContext(SelectGroupContext); if (v == null) { throw new Error( "Base UI: SelectGroupContext is missing. GroupLabel must be placed within .", ); } return v; }