import ZRText, { TextStyleProps } from 'zrender/esm/graphic/Text';
import Element, { ElementTextConfig } from 'zrender/esm/Element';
import Model from '../model/Model';
import { LabelOption, DisplayState, TextCommonOption, ParsedValue, CallbackDataParams, StatesOptionMixin, DisplayStateNonNormal, ColorString, ZRStyleProps } from '../util/types';
import GlobalModel from '../model/Global';
declare type TextCommonParams = {
    disableBox?: boolean;
    inheritColor?: ColorString;
    defaultOutsidePosition?: LabelOption['position'];
    textStyle?: ZRStyleProps;
};
interface SetLabelStyleOpt<LDI> extends TextCommonParams {
    defaultText?: string | ((labelDataIndex: LDI, opt: SetLabelStyleOpt<LDI>) => string);
    labelFetcher?: {
        getFormattedLabel: (labelDataIndex: LDI, status: DisplayState, dataType?: string, labelDimIndex?: number, formatter?: string | ((params: object) => string), extendParams?: Partial<CallbackDataParams>) => string;
    };
    labelDataIndex?: LDI;
    labelDimIndex?: number;
}
declare type LabelModel = Model<LabelOption & {
    formatter?: string | ((params: any) => string);
}>;
declare type LabelModelForText = Model<Omit<LabelOption, 'position' | 'rotate'> & {
    formatter?: string | ((params: any) => string);
}>;
declare type LabelStatesModels<LabelModel> = Partial<Record<DisplayStateNonNormal, LabelModel>> & {
    normal: LabelModel;
};
export declare function getLabelText<LDI>(opt: SetLabelStyleOpt<LDI>, stateModels?: LabelStatesModels<LabelModel>, overrideValue?: ParsedValue | ParsedValue[]): Record<DisplayState, string>;
declare function setLabelStyle<LDI>(targetEl: ZRText, labelStatesModels: LabelStatesModels<LabelModelForText>, opt?: SetLabelStyleOpt<LDI>, stateSpecified?: Partial<Record<DisplayState, TextStyleProps>>): void;
declare function setLabelStyle<LDI>(targetEl: Element, labelStatesModels: LabelStatesModels<LabelModel>, opt?: SetLabelStyleOpt<LDI>, stateSpecified?: Partial<Record<DisplayState, TextStyleProps>>): void;
export { setLabelStyle };
export declare function getLabelStatesModels<LabelName extends string = 'label'>(itemModel: Model<StatesOptionMixin<any> & Partial<Record<LabelName, any>>>, labelName?: LabelName): Record<DisplayState, LabelModel>;
export declare function createTextStyle(textStyleModel: Model, specifiedTextStyle?: TextStyleProps, opt?: Pick<TextCommonParams, 'inheritColor' | 'disableBox'>, isNotNormal?: boolean, isAttached?: boolean): TextStyleProps;
export declare function createTextConfig(textStyleModel: Model, opt?: Pick<TextCommonParams, 'defaultOutsidePosition' | 'inheritColor'>, isNotNormal?: boolean): ElementTextConfig;
export declare function getFont(opt: Pick<TextCommonOption, 'fontStyle' | 'fontWeight' | 'fontSize' | 'fontFamily'>, ecModel: GlobalModel): string;
