import { type ComputedRef, type Ref } from 'vue'; type UseDropdownOptions = { /** * The root element of the dropdown. The composable will use this element to query the list items. */ root: Ref; }; export type UseDropdown = { /** * The id of the currently activated menu item */ activatedMenuItemId: Ref; /** * The root element of the dropdown. The composable will use this element to query the list items. */ root: Ref; /** * Whether the dropdown is open or not */ isOpen: Ref; /** * The list items of the dropdown */ listItems: Ref | null>; /** * The index of the currently active item */ activeIndex: Ref; /** * The number of list items */ listItemsCount: ComputedRef; /** * Method responsible for loading the list items. This method should be executed after the dropdown is mounted. * @returns void */ loadListItems: () => void; /** * Update the tabindex of the list items based on the index * @param index number * @returns void */ updateTabIndex: (index: number) => void; /** * Method that focuses on the first item of the dropdown * @returns void */ focusOnFirstItem: () => void; /** * Method that focuses on the last item of the dropdown * @returns void */ focusOnLastItem: () => void; /** * Method that handles the keydown event on the list items. This method should be use in the keydown event listener of the element that contains the list SbDropdownItem. * @param event KeyboardEvent * @param options Object * @param options.onEscape Function * @param options.onKeydown Function * @param options.onClose Function * @returns * @returns void */ handleKeydownOnList: (event: KeyboardEvent, options?: { onEscape?: (event: KeyboardEvent) => void; onKeydown?: (event: KeyboardEvent) => void; onClose?: (event: KeyboardEvent) => void; }) => void; }; export declare const useDropdown: (options: UseDropdownOptions) => UseDropdown; export {};