import type { Node as ProseMirrorNode } from 'prosemirror-model';
import type { PmConverters } from '../../pm-converters/collect';
import type { ImageComponentData, UpdateEntityFileSelectFunc, UpdateEntityFileUploadFunc } from '../../ricos-content/index.js';
import type { Media } from '@wix/ricos/schema';
import type { RicosDocument } from '../../ricos-schema/next-schema';
import type { PmLayoutCellNode, PmLayoutNode } from '../../_shared/pm-node-types.js';
import type { NodeWithPos } from '../../tiptap/index';
import type { Node as PmNode } from '../../tiptap/pm/model';
import type { Transaction } from '../../tiptap/pm/state';
import type { Editor } from '../../tiptap/react';
import { TOOLBARS } from '../../editor-common/index.js';
export declare const createEmptyCell: (colSpan: number) => PmLayoutCellNode;
export declare const createBlankLayoutData: (colCount: number) => PmLayoutNode['attrs'] & {
    content: PmLayoutNode['content'];
};
export declare const convertPresetToLayoutData: (presetContent: RicosDocument, converters: PmConverters) => ({
    id: string;
    backgroundColor?: string;
    background?: import("../../ricos-schema/next-schema").LayoutData['background'];
    backgroundImage?: import("../../ricos-schema/next-schema").LayoutData['backgroundImage'];
    borderColor?: string;
    borderWidth?: number;
    borderRadius?: number;
    backdropColor?: string;
    backdrop?: import("../../ricos-schema/next-schema").LayoutData['backdrop'];
    backdropImage?: import("../../ricos-schema/next-schema").LayoutData['backdropImage'];
    backdropPaddingTop?: number;
    backdropPaddingBottom?: number;
    gap?: number;
    cellPadding?: number[];
    responsivenessBehaviour?: import("../../ricos-schema/next-schema").LayoutData['responsivenessBehaviour'];
    responsivenessBreakpoint?: number;
    designTarget?: import("../../ricos-schema/next-schema").LayoutData['designTarget'];
    containerData: import("../../ricos-schema/next-schema").LayoutData['containerData'];
    banner?: import("../../ricos-schema/next-schema").LayoutData['banner'];
    loading?: {
        backgroundImage?: boolean;
        backdropImage?: boolean;
    };
    error?: import("../../ricos-content/index.js").MediaUploadError;
} & {
    content: PmLayoutNode['content'];
}) | null;
export declare const balanceLayoutCells: (tr: Transaction, node: PmNode, pos: number) => void;
export declare const findLayoutOfCell: (node: ProseMirrorNode, cellId: string) => NodeWithPos | null;
export declare const getParentNodeId: (tr: Transaction, nodeId: string) => any;
export declare const getToolbarReferenceElement: (tiptapEditor: Editor) => HTMLElement | {
    getBoundingClientRect: () => DOMRect;
    contextElement: HTMLElement;
} | null;
export declare const toolbarsToAddIn: TOOLBARS[];
export type LayoutEditorConfig = {
    showInToolbars?: boolean;
    showInQuickActions?: boolean;
    handleFileUpload?: handleFileUploadType;
    handleFileSelection?: handleFileSelectionType;
};
export type handleFileSelectionType = (updateEntity: UpdateEntityFileSelectFunc<ImageComponentData>, removeEntity?: any) => void;
export type handleFileUploadType = (files: File, updateEntity: UpdateEntityFileUploadFunc<ImageComponentData>) => void;
export declare const tryParseJson: (value: string | null) => Record<string, unknown> | null;
export declare const DEFAULT_BACKDROP_VERTICAL_SPACING = 26;
export declare const DEFAULT_BANNER_VERTICAL_SPACING = 50;
export declare const createQuickActionBannerLayout: (position?: 'TOP' | 'BOTTOM') => {
    headingId: string;
    layoutNode: PmLayoutNode;
};
export declare const getImageUrl: (media: Media) => any;
/** Walks up from `pos` to find a parent CARD node. Returns its ID or undefined. */
export declare const findParentCardId: (doc: ProseMirrorNode, pos: number) => string | undefined;
/** After a deletion, finds the CARD by ID and returns its inner start position. Falls back to 0. */
export declare const getCardStartPos: (tr: Transaction, cardId: string) => number;
/** After a deletion, finds the CARD by ID and returns its inner end position. Falls back to doc end. */
export declare const getCardEndPos: (tr: Transaction, cardId: string) => number;
//# sourceMappingURL=shared.d.ts.map