import { WrText } from '../../../model/document';
import { LayoutContext } from '../../LayoutContext';
import { TextRun } from '../../../view/runs/TextRun';
import { TextWidget } from '../../../view/runs/TextWidget';
import { RunHandlerBase } from '../RunHandlerBase';
import { HandlerContext } from '../../types';
import { DataSlotIndex } from '../../../view/types';
type ValueType = string | number | undefined | null;
export declare class FieldBaseHandler extends RunHandlerBase {
    static hasValue(value: ValueType): boolean;
    static getModelRefId(context: LayoutContext, wr: WrText): string;
    static getDataSlotIndex(context: LayoutContext): DataSlotIndex | undefined;
    static getValue(ctx: HandlerContext, valuePath: string): any;
    static getLabel(ctx: HandlerContext, valuePath: string): any;
    static getNoValueLabel(ctx: HandlerContext): {
        label: string;
        type: 'placeholder' | 'fieldName' | 'noneLabel' | 'default';
    };
    /** 存在 href 且（打印态 / 填报只读）时应用超链接排版样式 */
    static shouldApplyHyperlinkLayoutStyle(ctx: HandlerContext, wr: WrText, templateValuePath: string): boolean;
    /** 字段文本排版样式（含 rPr + 超链接样式） */
    static resolveFieldTextLayoutStyle(ctx: HandlerContext, wr: WrText, templateValuePath: string): Partial<TextRun>;
    static formatFieldValue(ctx: HandlerContext, valuePath: string): any;
    /**
     * 渲染组件值 label -> value
     * @param ctx
     */
    static layoutValue(ctx: HandlerContext): void;
    /**
     * 填报时候的空值渲染
     * @param ctx
     */
    static layoutNoValueLabel(ctx: HandlerContext): void;
    /**
     * 渲染时增加间距
     * @param payload
     */
    static addSpace(payload: {
        ctx: HandlerContext;
        textMetrics: {
            width: number;
            height: number;
            ascent: number;
            descent: number;
        };
        extra?: Partial<TextWidget>;
    }): void;
    /**
     * 渲染时增加文本
     * @param payload
     */
    static addLabel(payload: {
        ctx: HandlerContext;
        fontSize: number;
        label: string;
        layoutStyle?: Partial<TextRun>;
        extra?: Partial<TextWidget>;
    }): void;
    /**
     * 渲染时增加图标
     * @param payload
     */
    static addIcon(payload: {
        ctx: HandlerContext;
        textMetrics: {
            width: number;
            height: number;
            ascent: number;
            descent: number;
        };
        extra?: Partial<TextWidget>;
    }): void;
    /**
     * 渲染时增加文本
     * @param payload
     */
    static addFieldMarker(payload: {
        ctx: HandlerContext;
        fontSize: number;
        extra?: Partial<TextWidget>;
        position: 'left' | 'right';
    }): void;
}
export {};
