import type { DocumentChange, Spotlight } from '../ricos-common-plugins/spotlight/extension.js';
import type { RICOS_LAYOUT_CELL_TYPE, SMART_BLOCK_CELL_TYPE, SMART_BLOCK_TYPE, CARD_TYPE } from '../ricos-content/consts.js';
import type { ACTION_BUTTON_TYPE, AUDIO_TYPE, BLOCKQUOTE, BULLET_LIST_TYPE, CHECKBOX_LIST_TYPE, CODE_BLOCK_TYPE, COLLAPSIBLE_LIST_TYPE, DIVIDER_TYPE, DocumentStyle, EMBED_TYPE, EXTERNAL, FILE_UPLOAD_TYPE, GALLERY_TYPE, GIPHY_TYPE, HEADER_BLOCK, HTML_TYPE, IMAGE_TYPE, LINK_BUTTON_TYPE, LINK_PREVIEW_TYPE, NUMBERED_LIST_TYPE, POLL_TYPE, RICOS_ANCHOR_TYPE, RICOS_COLLAPSIBLE_LIST_TYPE, RICOS_DIVIDER_TYPE, RICOS_FILE_TYPE, RICOS_FONT_SIZE_TYPE, RICOS_GALLERY_TYPE, RICOS_GIPHY_TYPE, RICOS_HTML_TYPE, RICOS_IMAGE_TYPE, RICOS_INDENT_TYPE, RICOS_LAYOUT_TYPE, RICOS_LINE_SPACING_TYPE, RICOS_LINK_TYPE, RICOS_MENTION_TYPE, RICOS_POLL_TYPE, RICOS_SHAPE_TYPE, RICOS_TABLE_TYPE, RICOS_TEXT_COLOR_TYPE, RICOS_TEXT_HIGHLIGHT_TYPE, RICOS_VIDEO_TYPE, SHAPE_TYPE, TABLE_TYPE, UNSTYLED, VERTICAL_EMBED_TYPE, VIDEO_TYPE } from '../ricos-content/index.js';
import type { ButtonData, CardData, ColorData, DividerData, FileData, FontFamilyData, GalleryData, GIFData, HTMLData, ImageData, LayoutCellData, Link, LinkData, LinkPreviewData, PollData, RichContent, ShapeData, VideoData, TocData } from '@wix/ricos/schema';
import type { EditorPluginName, RicosDocumentNode } from '../ricos-schema/next-schema/index.js';
import type { NamedLink } from '../_shared/link/types.js';
import type { PmLayoutNode, PmSmartBlockCellNode, PmSmartBlockNode } from '../_shared/pm-node-types.js';
import type { Node as ProseMirrorNode } from '../tiptap/pm/model';
import type { TOC_TYPE } from '../plugin-toc/types.js';
import type { FocusPosition, InlineStyle, TextAlignment } from './common-types.js';
import type { MentionData } from './plugin-types.js';
export type ColorType = typeof RICOS_TEXT_COLOR_TYPE | typeof RICOS_TEXT_HIGHLIGHT_TYPE;
type PluginsList = EditorPluginName[];
type BlockKey = string;
export type TextBlockType = typeof UNSTYLED | typeof NUMBERED_LIST_TYPE | typeof BULLET_LIST_TYPE | typeof CHECKBOX_LIST_TYPE | typeof CODE_BLOCK_TYPE | typeof BLOCKQUOTE | typeof HEADER_BLOCK.ONE | typeof HEADER_BLOCK.TWO | typeof HEADER_BLOCK.THREE | typeof HEADER_BLOCK.FOUR | typeof HEADER_BLOCK.FIVE | typeof HEADER_BLOCK.SIX;
export type HeadingType = Omit<TextBlockType, typeof NUMBERED_LIST_TYPE | typeof BLOCKQUOTE | typeof CODE_BLOCK_TYPE | typeof BULLET_LIST_TYPE | typeof CHECKBOX_LIST_TYPE>;
type Selection = {
    isFocused?: boolean;
    isCollapsed?: boolean;
    startKey?: string;
    endKey?: string;
    textContent?: string;
    selectedNodes: ProseMirrorNode[];
    isEditorOrPortalFocused: () => boolean;
};
type draftSelection = {
    anchorKey?: string;
    anchorOffset?: number;
    focusKey?: string;
    focusOffset?: number;
    isBackward?: boolean;
    hasFocus?: boolean;
};
export interface PluginsDataMap {
    [RICOS_DIVIDER_TYPE]?: DividerData;
    [DIVIDER_TYPE]?: any;
    [RICOS_GIPHY_TYPE]?: GIFData;
    [GIPHY_TYPE]?: any;
    [RICOS_HTML_TYPE]?: HTMLData;
    [HTML_TYPE]?: any;
    [TOC_TYPE]?: TocData;
    [RICOS_GALLERY_TYPE]?: GalleryData;
    [GALLERY_TYPE]?: any;
    [RICOS_POLL_TYPE]?: PollData;
    [POLL_TYPE]?: any;
    [RICOS_VIDEO_TYPE]?: VideoData;
    [VIDEO_TYPE]?: any;
    [RICOS_FILE_TYPE]?: FileData;
    [FILE_UPLOAD_TYPE]?: any;
    [RICOS_IMAGE_TYPE]?: ImageData;
    [IMAGE_TYPE]?: any;
    [COLLAPSIBLE_LIST_TYPE]?: any;
    [RICOS_COLLAPSIBLE_LIST_TYPE]?: any;
    [CODE_BLOCK_TYPE]?: any;
    [EXTERNAL]?: any;
    [VERTICAL_EMBED_TYPE]?: any;
    [EMBED_TYPE]?: any;
    [AUDIO_TYPE]?: any;
    [LINK_BUTTON_TYPE]?: ButtonData;
    [ACTION_BUTTON_TYPE]?: ButtonData;
    [LINK_PREVIEW_TYPE]?: LinkPreviewData;
    [TABLE_TYPE]?: any;
    [RICOS_TABLE_TYPE]?: any;
    [RICOS_LAYOUT_TYPE]?: PmLayoutNode['attrs'] & {
        content?: PmLayoutNode['content'];
    };
    [RICOS_LAYOUT_CELL_TYPE]?: LayoutCellData;
    [RICOS_SHAPE_TYPE]?: ShapeData;
    [SHAPE_TYPE]?: any;
    [SMART_BLOCK_TYPE]?: PmSmartBlockNode['attrs'];
    [SMART_BLOCK_CELL_TYPE]?: PmSmartBlockCellNode['attrs'];
    [CARD_TYPE]?: CardData;
}
export declare const CUSTOM_LINK = "custom-link";
export interface DecorationsDataMap {
    ['FONT_FAMILY']?: FontFamilyData;
    [RICOS_LINK_TYPE]?: LinkData['link'];
    [RICOS_ANCHOR_TYPE]?: {
        anchor: string;
        defaultName?: string;
    };
    [CUSTOM_LINK]?: LinkData;
    [RICOS_MENTION_TYPE]?: MentionData;
    [RICOS_TEXT_COLOR_TYPE]?: {
        color?: ColorData['foreground'];
    };
    [RICOS_TEXT_HIGHLIGHT_TYPE]?: {
        color?: ColorData['background'];
    };
    [RICOS_INDENT_TYPE]?: number;
    [RICOS_LINE_SPACING_TYPE]?: any;
    [RICOS_FONT_SIZE_TYPE]?: {
        fontSize?: string;
    };
}
export type InsertTextOptions = {
    preventAutolink?: boolean;
};
export interface PublicCommands {
    getContent: () => RichContent;
    getSelection: () => Selection;
    getAnchorableBlocks: () => {
        anchorableBlocks: any[];
        pluginsIncluded: string[];
    };
    getDocumentStyle: () => DocumentStyle | undefined;
    getColor: (colorType: ColorType) => string | undefined;
    getFontSize: () => string | undefined;
    getFontFamily: () => string | undefined;
    getTextAlignment: () => TextAlignment;
    getAnchorBlockInlineStyles: () => Record<string, string>;
    getInlineStylesInSelection: () => Record<string, string>;
    hasInlineStyle: (style: InlineStyle) => boolean;
    isBlockTypeSelected: (type: TextBlockType) => boolean;
    isUndoStackEmpty: () => boolean;
    isRedoStackEmpty: () => boolean;
    hasLinkInSelection: (options?: {
        inclusive?: boolean;
    }) => boolean;
    getLinkDataInSelection: (options?: {
        inclusive?: boolean;
    }) => Link | undefined;
    selectLinkDecoration: (decoration: typeof RICOS_LINK_TYPE | typeof RICOS_ANCHOR_TYPE, options?: {
        inclusive?: boolean;
    }) => void;
    getSelectedData: () => any;
    getPluginsList: (settings?: {
        isRicosSchema?: boolean;
    }) => PluginsList;
    scrollToBlock: (blockKey: BlockKey) => void;
    isBlockInContent: (blockKey: BlockKey) => boolean;
    toggleBlockOverlay: (blockKey: BlockKey) => void;
    getBlockSpacing: () => any;
    saveEditorState: () => void;
    loadEditorState: () => void;
    saveSelectionState: () => void;
    loadSelectionState: () => void;
    insertDecoration: <K extends keyof DecorationsDataMap>(type: K, data?: DecorationsDataMap[K], settings?: {
        isRicosSchema?: boolean;
        shouldFocus?: boolean;
    }) => void;
    triggerDecoration: <K extends keyof Pick<DecorationsDataMap, typeof RICOS_MENTION_TYPE>>(type: K) => void;
    deleteDecoration: <K extends keyof Omit<DecorationsDataMap, typeof RICOS_MENTION_TYPE | typeof RICOS_LINE_SPACING_TYPE | typeof CUSTOM_LINK>>(type: K) => void;
    insertMultipleAnchors: (anchors: NamedLink[]) => void;
    insertBlock: <K extends keyof PluginsDataMap>(type: K, data?: PluginsDataMap[K], settings?: {
        isRicosSchema?: boolean;
    }) => string;
    insertBlockWithBlankLines: <K extends keyof PluginsDataMap>(type: K, data?: PluginsDataMap[K], settings?: {
        isRicosSchema?: boolean;
        /**
         * Controls how selection behaves after block insertion
         * @property {boolean | "text"} updateSelection
         * - `true` (default) - selects the entire inserted block
         * - `false` - keeps the current selection unchanged
         * - `"text"` - moves caret to text content inside inserted block
         * @default true
         */
        updateSelection?: boolean | 'text';
        /**
         * Controls the position of the inserted block. If not provided, the block will be inserted at current selection pos.
         */
        pos?: number;
        /**
         * Controls whether to skip blank line before inserted block
         */
        skipBlankLineBefore?: boolean;
        /**
         * Controls whether to skip blank line after inserted block
         */
        skipBlankLineAfter?: boolean;
    }) => string;
    setBlock: <K extends keyof PluginsDataMap>(blockKey: BlockKey, type: K, data?: PluginsDataMap[K], settings?: {
        /** @deprecated */
        isRicosSchema?: boolean;
    }) => void;
    updateBlock: <K extends keyof PluginsDataMap>(blockKey: string, pluginType: K, data: PluginsDataMap[K]) => boolean;
    deleteBlock: (blockKey: BlockKey) => void;
    undo: () => void;
    redo: () => void;
    toggleInlineStyle: (inlineStyle: InlineStyle) => void;
    setBlockType: (type: TextBlockType) => void;
    setTextAlignment: (textAlignment: TextAlignment) => void;
    _setSelection: (blockKey: BlockKey, selection: draftSelection) => void;
    resetDocumentStyleByNodeType: (type: $TSFixMe) => void;
    updateDocumentStyle: (documentStyle: DocumentStyle) => void;
    clearSelectedBlocksInlineStyles: (exclude?: string[]) => void;
    getWiredFontStyles: () => Record<string, string> | undefined;
    isAtomicBlockInSelection: () => boolean;
    isTextBlockInSelection: () => boolean;
    getAnchorBlockType: () => string;
    getAllBlocksKeys: () => string[];
    focus: (focusPosition?: FocusPosition) => void;
    getBlockComponentData: <K extends keyof PluginsDataMap>(blockKey: string) => PluginsDataMap[K] | Record<string, string>;
    insertText: (text: string, options?: InsertTextOptions) => boolean;
    getCurrentHeading: () => HeadingType;
    softNewLine: () => void;
    clearEditorContent: (triggerUpdate: boolean) => void;
    /** @internal */
    setSpotlight: (spotlightList: Spotlight[]) => void;
    /** @internal */
    injectNodes: (args: DocumentChange[]) => DocumentChange[];
    /** @internal */
    getSelectionSlice: () => RicosDocumentNode[] | undefined;
    /** @internal */
    triggerInlineAi: (args: {
        invocationId: string;
        prompt: string;
        headless: boolean;
        files?: {
            fileUrl: string;
            mimeType: string;
            fileName: string;
        }[];
        traceParams?: Record<string, string>;
    }) => void;
    /** @internal */
    toggleAiSuggestions: (visible: boolean) => void;
    setContent: (content: RichContent, options?: {
        skipHistory?: boolean;
    }) => void;
}
export {};
//# sourceMappingURL=editor-commands-type.d.ts.map