import { MutableReactiveValue } from '../../../util/ReactiveValue'; import { IconElemType } from '../../IconProvider'; interface GridSelectChoice { id: ChoiceIdType; makeIcon: () => IconElemType; title: string; } interface GridSelector { value: MutableReactiveValue; /** * Connects this grid selector with `other` such that only one item in * either this or `other` can be selected at a time. */ linkWith: (other: GridSelector) => void; /** Re-builds the icons shown in the grid selector. */ updateIcons: () => void; getRootElement: () => HTMLElement; addTo: (parent: HTMLElement) => void; /** Used internally @internal */ _radiogroupName: string; } /** * Creates a widget that allows users to select one of serveral items from a list. * * `ChoiceIdType` should be `string`, a `number`, or an `enum` (or similar). * * If this input is set to an ID that is not in `choices`, no item is selected. */ declare const makeGridSelector: (labelText: string, defaultId: ChoiceIdType, choices: GridSelectChoice[]) => GridSelector; export default makeGridSelector;