/**
 * 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 DOMConversionMap, type EditorConfig, ElementNode, type LexicalCommand, type LexicalNode, type NodeKey, type NodeSelection, type RangeSelection } from 'lexical';
import type { SerializedAutoLinkNode } from './auto-link-node';
import type { LinkAttributes, SerializedLinkNode } from './types';
/** @noInheritDoc */
export declare class LinkNode extends ElementNode {
    __attributes: LinkAttributes;
    static getType(): string;
    static clone(node: LinkNode): LinkNode;
    constructor({ attributes, key, }: {
        attributes: LinkAttributes;
        key?: NodeKey;
    });
    createDOM(config: EditorConfig): HTMLAnchorElement;
    updateDOM(prevNode: LinkNode, anchor: HTMLAnchorElement, _config: EditorConfig): boolean;
    static importDOM(): DOMConversionMap | null;
    static importJSON(serializedNode: SerializedLinkNode | SerializedAutoLinkNode): LinkNode;
    exportJSON(): SerializedLinkNode | SerializedAutoLinkNode;
    getAttributes(): LinkAttributes;
    setAttributes(attributes: LinkAttributes): void;
    insertNewAfter(selection: RangeSelection, restoreSelection?: boolean): null | ElementNode;
    canInsertTextBefore(): false;
    canInsertTextAfter(): false;
    canBeEmpty(): false;
    isInline(): true;
    extractWithChild(_child: LexicalNode, selection: RangeSelection | NodeSelection, _destination: 'clone' | 'html'): boolean;
}
export declare function $createLinkNode({ attributes }: {
    attributes: LinkAttributes;
}): LinkNode;
export declare function $isLinkNode(node: LexicalNode | null | undefined): node is LinkNode;
export declare const TOGGLE_LINK_COMMAND: LexicalCommand<LinkAttributes | null>;
/**
 * Asks the FloatingLinkEditorPlugin to open its edit modal for the link
 * containing the current selection. Used by the toolbar on fresh link
 * insertion so the user lands directly in the picker, and by anything else
 * that wants to drive the modal without faking a pencil-icon click.
 */
export declare const OPEN_LINK_MODAL_COMMAND: LexicalCommand<void>;
export declare function $toggleLink(linkAttributes: (LinkAttributes & {
    text?: string;
}) | null): void;
