/** * Options for {@link useSelectionState}. * * @category Hooks */ export interface SelectionStateOptions { /** Selection type controlling whether one or multiple values can be active. Default: 'single'. */ type?: 'single' | 'multiple'; /** Controlled selected value(s). */ value?: string | string[]; /** Initial selected value(s) for uncontrolled usage. */ defaultValue?: string | string[]; /** Called whenever the selection changes. */ onChange?: (values: string[]) => void; /** Whether the active value can be unselected in `single` mode. Default: true. */ deselectable?: boolean; } /** * Hook that provides shared selection state for components * such as Accordion, Tabs or List. * * Manages selected values and exposes selection helpers. Supports both * controlled (`value` + `onChange`) and uncontrolled (`defaultValue`) usage. * * @function * * @remarks * Selection only — keyboard focus is a separate concern, handled by * {@link useFocusNavigation} where the component needs it. * * @param options Selection configuration. * * @returns Object containing selection state and helper functions. * * @example * const { values, toggle } = useSelectionState({ type: 'multiple', defaultValue: 'a' }); * * @category Hooks */ export declare function useSelectionState({ type, value, defaultValue, onChange, deselectable, }?: SelectionStateOptions): { values: string[]; toggle: (v: string) => void; set: (v: string) => void; clear: () => void; type: "single" | "multiple"; };