import { AnchorAlignment } from "../../../base/browser/ui/contextview/contextview.js"; import { IAction, IActionRunner } from "../../../base/common/actions.js"; import { KeyCode } from "../../../base/common/keyCodes.js"; import { ResolvedKeybinding } from "../../../base/common/keybindings.js"; import { Disposable } from "../../../base/common/lifecycle.js"; import { IContextViewService } from "../../../platform/contextview/browser/contextView.service.js"; export interface ISubmenuFlyoutOptions { /** The entry the flyout opens beside. It receives `aria-expanded` and the `submenu-open` class. */ readonly anchor: HTMLElement; readonly getActions: () => readonly IAction[]; readonly getActionRunner: () => IActionRunner; readonly lookupKeybinding: (commandId: string) => ResolvedKeybinding | undefined; /** Keys on the anchor that open the flyout and move focus into it. */ readonly openKeys: readonly KeyCode[]; /** Keys inside the flyout that close it and return focus to the anchor, in addition to Escape. */ readonly closeKeys: readonly KeyCode[]; /** * The side the flyout prefers: {@link AnchorAlignment.LEFT} (the default) opens it to the anchor's * right and {@link AnchorAlignment.RIGHT} to its left. It flips when the preferred side has no room. */ readonly anchorAlignment?: AnchorAlignment; } /** * Shows a submenu beside an entry like a menu's own submenus: it opens after a short * hover, stays open while the pointer moves into it, and supports the keyboard. The * context view places it on the preferred side of the anchor, or the other side when * the preferred one has no room. */ export declare class SubmenuFlyout extends Disposable { private readonly options; private readonly contextViewService; private static readonly SHOW_DELAY; private static readonly HIDE_DELAY; private readonly flyout; private menu; private readonly showScheduler; private readonly hideScheduler; get isOpen(): boolean; constructor(options: ISubmenuFlyoutOptions, contextViewService: IContextViewService); /** Opens the flyout, or moves focus into it when it is already open and `focus` is set. */ show(focus: boolean): void; }