import { KeyboardEvent, RefObject } from 'react'; export interface SelectListboxOption { value: string; label: string; /** NB-SELECT-DISABLE-01 — visible but non-selectable; keyboard nav skips it. */ disabled?: boolean; /** NB-SELECT-DISABLE-01 — native title tooltip on the disabled row. */ disabledReason?: string; } interface UseSelectListboxArgs { options: SelectListboxOption[]; value?: string; disabled?: boolean; searchable?: boolean; onChange?: (value: string) => void; /** * NB-POPOVER-01 — when the options panel is portaled out of `containerRef` * (document.body), pass its ref so an outside-click on an option/search input * inside the portaled panel does not close the panel before the click lands. * Absent → behavior unchanged. */ panelRef?: RefObject; } export declare function useSelectListbox({ options, value, disabled, searchable, onChange, panelRef, }: UseSelectListboxArgs): { open: boolean; search: string; activeIndex: number; setActiveIndex: import('react').Dispatch>; filtered: SelectListboxOption[]; listboxId: string; optionId: (index: number) => string; activeId: string | undefined; containerRef: RefObject; triggerRef: RefObject; openPanel: (initialIndex?: number) => void; closePanel: (refocusTrigger?: boolean) => void; handleSelect: (val: string) => void; handleTriggerKeyDown: (e: KeyboardEvent) => void; handleSearchChange: (next: string) => void; handleSearchKeyDown: (e: KeyboardEvent) => void; }; export {}; //# sourceMappingURL=useSelectListbox.d.ts.map