import { Dispatch, SetStateAction } from 'react'; import { ListboxProps } from '../Listbox'; /** * Context properties for the Listbox component * @template T - The type of additional properties for items */ export type ListboxContextProps = { /** ID of the currently focused option */ currentFocus?: string; /** Function to set the currently focused option */ setCurrentFocus: Dispatch["currentFocus"]>>; /** Currently selected option(s) */ selected: ListboxProps["defaultSelected"]; /** Function to set the selected option(s) */ setSelected: Dispatch["selected"]>>; /** List of available option elements */ options: NodeListOf | undefined; /** Current selection mode */ selectionMode: Exclude["selectionMode"], undefined>; /** Callback when selection changes */ onSelectionChange: ListboxProps["onSelectionChange"]; /** Whether auto-select on focus is disabled */ disableAutoSelectOnFocus: boolean; /** Array of items if using items prop */ items?: unknown[]; /** Whether the component is controlled */ controlled?: boolean; }; /** * Context for sharing listbox state between components */ export declare const ListboxContext: import('react').Context | null>; /** * Hook to access the listbox context * @returns The listbox context * @throws Error if used outside of a Listbox component */ export declare const useListbox: () => ListboxContextProps;