import { WrText } from '../../../model/document';
import { LayoutContext } from '../../LayoutContext';
import { TextWidget } from '../../../view/runs/TextWidget';
type ValueType = string | number | undefined | null;
export type HandlerContext = {
    context: LayoutContext;
    wr: WrText;
};
export declare class BaseHandler {
    static hasValue(value: ValueType): boolean;
    static getId(context: LayoutContext, wr: WrText): string;
    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';
    };
    static formatDateTimeValue(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;
        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 {};
