import type { TemplateResult } from '@mantou/gem/lib/element'; import { GemElement } from '@mantou/gem/lib/element'; import './compartment'; import './button'; export { SEPARATOR } from './options'; type Menu = ContextMenuItem[] | TemplateResult; type MenuOptions = { /**support `auto`, inherit */ width?: string; maxHeight?: string; header?: TemplateResult; searchable?: boolean; }; type MenuObject = MenuOptions & { menu: Menu; }; export type MenuOrMenuObject = Menu | MenuObject; export interface ContextMenuItem { text: string | TemplateResult; description?: string | TemplateResult; tag?: string | TemplateResult; tagIcon?: string | DocumentFragment | Element; disabled?: boolean; danger?: boolean; selected?: boolean; handle?: () => void | Promise; menu?: MenuOrMenuObject; } type ContextMenuOptions = MenuOptions & { /**auto calc `x`/`y` via `activeElement` */ activeElement?: HTMLElement | null; /**priority is higher than `activeElement` */ x?: number; y?: number; /**only work `activeElement`, only support first menu */ openLeft?: boolean; maskClosable?: boolean; }; export declare class DuoyunContextmenuElement extends GemElement { #private; static instance?: DuoyunContextmenuElement; static open(contextmenu: MenuOrMenuObject, options?: ContextMenuOptions): Promise; static confirm(text: string | TemplateResult, options: ContextMenuOptions & { danger?: boolean; okText?: string | TemplateResult; }): Promise; static close(): void; render: () => TemplateResult; } export declare const ContextMenu: typeof DuoyunContextmenuElement; //# sourceMappingURL=contextmenu.d.ts.map