import { type SVGTemplateResult, type TemplateResult } from 'lit';
import type { MenuItem } from './MenuItem.js';
import type UiListItem from '../../../md/list/internals/ListItem.js';
import UiList from '../../../md/list/internals/List.js';
import '../../../md/list/ui-list-item.js';
import '../../../md/divider/ui-divider.js';
export declare const arrowRight: SVGTemplateResult;
export declare const check: SVGTemplateResult;
interface IMenuFocusOptions extends FocusOptions {
    /**
     * When set it focuses on the first menu item.
     */
    selectFirst?: boolean;
}
interface CreateNestedOptions {
    /**
     * When using keyboard navigation.
     * When set it focuses on the first created event.
     */
    keyboard?: boolean;
}
/**
 * @fires close - when the menu closes.
 * @fires trigger - when a command is triggered
 */
export default class ContextualMenuElement<S = unknown> extends UiList {
    accessor _items: NodeListOf<UiListItem>;
    set items(value: UiListItem[]);
    get items(): UiListItem[];
    /**
     * The list of commands to render.
     */
    accessor commands: MenuItem<S>[] | undefined;
    /**
     * The commands store.
     */
    accessor store: S | undefined;
    /**
     * The menu triggering click target
     */
    accessor target: HTMLElement | SVGElement | undefined;
    /**
     * The current workspace
     */
    accessor workspace: HTMLElement | undefined;
    /**
     * Any arbitrary data to pass to the lifecycle functions.
     */
    accessor customData: unknown | undefined;
    /**
     * The timeout after which the sub menu become visible or is removed from the menu.
     */
    accessor subMenuTimeout: number;
    /**
     * The id of the parent command, in case when this menu is a sub-menu.
     */
    accessor parentCommand: string | undefined;
    protected nestedIdValue?: string;
    protected nestedTimeout?: number;
    protected removingTimeout?: number;
    constructor();
    connectedCallback(): void;
    close(): void;
    /**
     * Triggest nested menu when hovering an item that has a nested menu.
     */
    protected mouseoverHandler(e: MouseEvent): void;
    /**
     * Builds a nested menu for a command.
     * @param id The id of the command
     */
    protected buildNested(id: string): void;
    /**
     * Adds the nested menu to the local DOM.
     */
    protected createNested(opts?: CreateNestedOptions): void;
    protected handleCloseNested(): void;
    /**
     * Triggers the remove nested menu action.
     */
    protected removeNested(): void;
    focus(options?: IMenuFocusOptions): void;
    /**
     * Waits for the update to complete and focuses on the first item
     * or self when there are no items.
     */
    protected focusAfterUpdate(options?: IMenuFocusOptions): Promise<void>;
    /**
     * Removes the nested menu from the DOM.
     */
    protected clearNested(): void;
    /**
     * Opens the menu when the current focused item has a sub menu.
     */
    protected moveRight(): void;
    /**
     * Closes the menu when this is a sub menu.
     */
    protected moveLeft(): void;
    /**
     * A handler for the sub-menu `trigger` event.
     * Retargets the event to the parent.
     * It adds `parent` to the detail, when the parent (currently selected command) has
     * the execute function.
     */
    protected subTriggerHandler(e: CustomEvent): void;
    handleKeydown(e: KeyboardEvent): void;
    protected activateFromEvent(e: Event): void;
    protected activate(id?: string): void;
    render(): TemplateResult;
    protected renderMenuItem(item: MenuItem<S>): TemplateResult | string;
    protected renderSeparator(item: MenuItem<S>): TemplateResult;
    protected renderLabel(item: MenuItem<S>): TemplateResult;
    protected renderMenuEntry(item: MenuItem<S>): TemplateResult;
    protected renderRadioEntry(item: MenuItem<S>): TemplateResult;
    /**
     * @param icon The icon is not required.
     */
    protected renderMenuEntryIcon(icon?: SVGTemplateResult): TemplateResult;
    /**
     * @return The template for sub-menu icon
     */
    protected renderChildIcon(): TemplateResult;
    /**
     * @return The template for the menu entry checked mark.
     */
    protected renderCheckMark(checked: boolean): TemplateResult | string;
}
export {};
//# sourceMappingURL=ContextualMenuElement.d.ts.map