import type { ComponentInternalInstance, ComputedRef, InjectionKey, ModelRef, Ref } from 'vue'; import type { ComponentExposed } from 'vue-component-type-helpers'; import type { ChildrenTrackerInjectionKey } from '../../use'; import type PfMenuList from './MenuList.vue'; export type MenuItemId = string | number | symbol; export interface MenuState { /** Element focused after the next drilldown transition */ transitionMoveTarget: HTMLElement | null; disableHover: boolean; } export type MenuProvide = { parentMenu: MenuProvide | undefined; /** Id of the menu */ menuId: ComputedRef; /** Id of the parent menu of a drilldown menu, or of the menu itself */ parentMenuId: ComputedRef; favoriteList: Ref | null>; selected?: Ref; /** Accessible role of the menu, "menu" or "listbox" */ role: ComputedRef; activeItemId: () => MenuItemId | undefined; state: MenuState; flyout: Ref; onActionClick?: (event: Event, itemId?: MenuItemId, actionId?: unknown) => void; onSelect?: (event: Event, itemId: MenuItemId | null | undefined) => void; /** Path of the drilled in item ids */ drilldownItemPath: ComputedRef; /** Ids of the drilled in menus */ drilledInMenus: ComputedRef; onDrillIn: (event: Event, fromMenuId: string, toMenuId: string, itemId: MenuItemId | null | undefined) => void; onDrillOut: (event: Event, toMenuId: string, itemId: MenuItemId | null | undefined) => void; onGetMenuHeight: (menuId: string, height: number) => void; /** Height of the menu content of the root drilldown menu, following the active menu */ drilldownMenuHeight: ComputedRef; }; export type MenuItemTrack = { element: Readonly>; disabled: ComputedRef; focused: Ref; favorited: ModelRef; focus: () => void; }; export type MenuItemProvide = { disabled: boolean; itemId: ComputedRef; /** Registers the id of the drilldown menu of the item */ setDrilldownMenuId: (id: string | undefined) => void; }; export declare const MenuItemsKey: ChildrenTrackerInjectionKey; export declare const MenuInjectionKey: InjectionKey; export declare const MenuItemInjectionKey: InjectionKey; /** Horizontal direction of the flyout menus, inherited by nested flyouts */ export declare const FlyoutDirectionKey: InjectionKey>; //# sourceMappingURL=common.d.ts.map