import * as React from 'react'; import type { GenericHTMLProps } from '../../utils/types.js'; import type { SelectRootContext } from '../root/SelectRootContext.js'; import { SelectIndexContext } from '../root/SelectIndexContext.js'; export declare function useSelectItem(params: useSelectItem.Parameters): useSelectItem.ReturnValue; export declare namespace useSelectItem { interface Parameters { /** * Whether the component should ignore user interaction. */ disabled: boolean; /** * Determines if the select item is highlighted. */ highlighted: boolean; /** * Determines if the select item is selected. */ selected: boolean; /** * The ref of the trigger element. */ ref?: React.Ref; /** * Whether the select menu is currently open. */ open: boolean; /** * The function to set the open state of the select. */ setOpen: SelectRootContext['setOpen']; /** * Determines if the user is currently typing for typeahead matching. */ typingRef: React.MutableRefObject; /** * The function to handle the selection of the item. */ handleSelect: () => void; /** * The ref to the selection state of the item. */ selectionRef: React.MutableRefObject<{ allowSelectedMouseUp: boolean; allowUnselectedMouseUp: boolean; allowSelect: boolean; }>; /** * A ref to the index of the selected item. */ selectedIndexRef: React.RefObject; /** * A ref to the index of the item. */ indexRef: React.RefObject; setActiveIndex: SelectIndexContext['setActiveIndex']; popupRef: React.RefObject; keyboardActiveRef: React.RefObject; } interface ReturnValue { getItemProps: (externalProps?: GenericHTMLProps) => GenericHTMLProps; rootRef: React.RefCallback | null; } }