/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
import type { MenuRenderFn, MenuResolution } from './shared/LexicalMenu';
import type { JSX } from 'react';
import { CommandListenerPriority, NodeKey, TextNode } from 'lexical';
import { MenuOption } from './shared/LexicalMenu';
/**
 * Props for the {@link LexicalNodeMenuPlugin} component.
 */
export type NodeMenuPluginProps<TOption extends MenuOption> = {
    onSelectOption: (option: TOption, textNodeContainingQuery: TextNode | null, closeMenu: () => void, matchingString: string) => void;
    options: TOption[];
    nodeKey: NodeKey | null;
    menuRenderFn?: MenuRenderFn<TOption>;
    onClose?: () => void;
    onOpen?: (resolution: MenuResolution) => void;
    anchorClassName?: string;
    commandPriority?: CommandListenerPriority;
    parent?: HTMLElement;
};
/**
 * Renders a floating menu anchored to a specific node (identified by
 * `nodeKey`), for example to offer actions on a just-inserted node. It is the
 * node-anchored counterpart to {@link LexicalTypeaheadMenuPlugin}: provide the
 * `options` to show and an `onSelectOption` handler, and the menu opens while
 * `nodeKey` refers to a node and closes when it becomes `null`.
 *
 * @returns The floating menu element, or `null` when the menu is closed.
 */
export declare function LexicalNodeMenuPlugin<TOption extends MenuOption>({ options, nodeKey, onClose, onOpen, onSelectOption, menuRenderFn, anchorClassName, commandPriority, parent, }: NodeMenuPluginProps<TOption>): JSX.Element | null;
export { MenuOption, MenuRenderFn, MenuResolution };
