import type { ReactElement } from 'react';
import type { Decoration, Decoration_Type, DocumentStyle, NodeStyle, TextStyle } from '@wix/ricos/schema';
import type { PmHeadingNode, PmParagraphNode } from '../_shared/pm-node-types.js';
import type { Subscription } from './events.js';
import type { RichTextNode } from './node-refined-types.js';
import type { RicosTheme } from './theme-types.js';
/**
 * Aggregates Theme and DocumentStyle
 *
 * Responsibilities:
 * - ensures DocumentStyle precedence over Theme
 * - extracts summarized decorations per node type
 *
 * @export
 * @interface AmbientStyles
 */
export interface AmbientStyles {
    onThemeUpdate(callback: (theme: RicosTheme) => void): Subscription;
    onDocumentStyleUpdate(callback: (documentStyle: DocumentStyle) => void): Subscription;
    getComputedLineHeight(node: PmParagraphNode | PmHeadingNode, nodeDom?: HTMLElement): string | undefined;
    /**
     * Extracts given decoration settings for specific node type from the current Document Style and Theme conjunction
     *
     *
     * @param {RichTextNode} type
     * @param {Decoration_Type} decoration type
     * @returns  {Decoration}
     * @memberof AmbientStyles
     */
    getDecoration(type: RichTextNode, decoration: Decoration_Type): Decoration;
    /**
     * Extracts given text style (line height) settings for specific node type from the current Document Style and Theme conjunction
     *
     *
     * @param {RichTextNode} type
     * @returns  {Omit<TextStyle, 'textAlignment'>}
     * @memberof AmbientStyles
     */
    getTextStyle(type: RichTextNode): Omit<TextStyle, 'textAlignment'>;
    /**
     * Extracts given node style (margins) settings for specific node type from the current Document Style and Theme conjunction
     *
     *
     * @param {RichTextNode} type
     * @returns  {NodeStyle}
     * @memberof AmbientStyles
     */
    getNodeStyle(type: RichTextNode): NodeStyle;
    /**
     * Sets new theme
     *
     * @param {RicosTheme} theme
     * @memberof AmbientStyles
     */
    setTheme(theme: RicosTheme, isMobile?: boolean): AmbientStyles;
    /**
     * Sets new Document Style
     *
     * @param {RichContentDocumentStyle} documentStyle
     * @memberof AmbientStyles
     */
    setDocumentStyle(documentStyle: DocumentStyle): AmbientStyles;
    /**
     * Produces HTML style tags for DocumentStyle and Theme, guarantees correct precedence
     * @deprecated
     * @returns  {ReactElement[]} style tag elements
     * @memberof AmbientStyles
     */
    toStyleTags(): ReactElement[];
}
//# sourceMappingURL=styles.d.ts.map