import { IQuestion, Question, LocalizableString, PanelModel, PageModel } from 'survey-core';
import { SurveyPDF } from './survey';
import { IPoint, IRect, ISize, DocController } from './doc_controller';
import { IFlatQuestion } from './flat_layout/flat_question';
import { IPdfBrick } from './pdf_render/pdf_brick';
import { ILinkOptions } from './pdf_render/pdf_link';
import { CompositeBrick } from './pdf_render/pdf_composite';
import { ITextFieldBrickOptions } from './pdf_render/pdf_textfield';
import { ISideValues } from './utils';
import { IAlignedTextStyle, IBorderStyle, IInputStyle, ITextStyle } from './style/types';
export interface IBorderDescription extends IRect, ISize {
}
export declare enum BorderMode {
    Inside = 0,
    Middle = 1,
    Outside = 2
}
export declare enum BorderRect {
    None = 0,
    Top = 1,
    Bottom = 2,
    Right = 4,
    Left = 8,
    All = 15
}
export interface IBorderExtendedStyle extends IBorderStyle {
    dashStyle?: {
        dashArray: [number, number] | [number];
        dashPhase: number;
    };
    borderMode?: BorderMode;
}
export declare class SurveyHelper {
    static readonly EPSILON: number;
    static readonly HTML_TAIL_TEXT_SCALE: number;
    static parseWidth(width: string, maxWidth: number, columnsCount?: number, defaultUnit?: string): number;
    static pxToPt(value: number | string): number;
    static parseColor(color: string): {
        color: string;
        opacity: number;
    };
    static mergeRects(...rects: IRect[]): IRect;
    static createPoint(rect: IRect, isLeft?: boolean, isTop?: boolean): IPoint;
    static createRect(point: IPoint, width: number, height: number): IRect;
    static createHeaderRect(controller: DocController): IRect;
    static createFooterRect(controller: DocController): IRect;
    static chooseHtmlFont(controller: DocController, fontName?: string): string;
    static generateCssTextRule(style: ITextStyle): string;
    static createHtmlContainerBlock(html: string, controller: DocController, style?: Readonly<ITextStyle>): string;
    static splitHtmlRect(controller: DocController, htmlBrick: IPdfBrick): IPdfBrick;
    static createPlainTextFlat(point: IPoint, controller: DocController, text: string, style: Required<IAlignedTextStyle>): CompositeBrick;
    static createTextFlat(point: IPoint, controller: DocController, text: string | LocalizableString, style?: Readonly<IAlignedTextStyle>): Promise<IPdfBrick>;
    static mergeObjects(dest: any, ...sources: Array<any>): any;
    static getPatchedTextStyle<T extends ITextStyle = ITextStyle>(controller: DocController, style?: Readonly<T>): T & Required<ITextStyle>;
    static getDefaultTextStyle(controller: DocController): Required<ITextStyle>;
    static hasHtml(text: LocalizableString): boolean;
    private static getHtmlMargins;
    static createHTMLRect(point: IPoint, controller: DocController, margins: {
        top: number;
        bottom: number;
        width: number;
    }, resultY: number, style?: Readonly<ITextStyle>): IRect;
    static createHTMLFlat(point: IPoint, controller: DocController, html: string, style?: Readonly<ITextStyle>): Promise<IPdfBrick>;
    static generateFontFace(fontName: string, fontBase64: string, fontWeight: string): string;
    static generateFontFaceWithItalicStyle(fontName: string, fontBase64: string, fontWeight: string): string;
    static htmlToXml(html: string): string;
    static createSvgContent(html: string, width: number, controller: DocController): {
        svg: string;
        divWidth: number;
        divHeight: number;
    };
    private static setCanvas;
    static htmlToImage(html: string, width: number, controller: DocController): Promise<{
        url: string;
        aspect: number;
    }>;
    static getReadonlyRenderAs(question: Question, controller: DocController): 'auto' | 'text' | 'acroform';
    static createCommentFlat(point: IPoint, controller: DocController, options: {
        rows?: number;
    } & ITextFieldBrickOptions, style?: Readonly<IInputStyle>): Promise<IPdfBrick>;
    static get hasDocument(): boolean;
    static createImageFlat(point: IPoint, question: any, controller: DocController, options: {
        link: string;
        width: number;
        height: number;
        objectFit?: 'cover' | 'contain' | 'fill';
    }, applyImageFit?: boolean): Promise<IPdfBrick>;
    static createRowlineFlat(point: IPoint, controller: DocController, width?: number, color?: string): IPdfBrick;
    static createLinkFlat(point: IPoint, controller: DocController, options: ILinkOptions, style?: Readonly<ITextStyle>): Promise<IPdfBrick>;
    static createAcroformRect(rect: IRect): number[];
    static createTextFieldRect(point: IPoint, controller: DocController, lines?: number, lineHeight?: number): IRect;
    static createReadOnlyTextFieldTextFlat(point: IPoint, controller: DocController, value: string, style: IInputStyle): Promise<IPdfBrick>;
    static createRoundedShape(rect: IRect, style: {
        borderRadius?: number | Array<number>;
    }, mergeAngles?: boolean | ISideValues<boolean>): Map<keyof ISideValues, Array<Array<number>>>;
    static getDocLinesFromShape(lines: Map<keyof ISideValues, Array<Array<number>>>): {
        lines: Array<Array<number>>;
        point: Array<number>;
    };
    static renderFlatBorders(controller: DocController, options: IBorderDescription, style: IBorderExtendedStyle): void;
    static getLocString(text: LocalizableString): string;
    static getContentQuestion(question: Question): Question;
    private static isBooleanDisplayMode;
    private static isEmptyRenderAs;
    private static getBooleanRenderAsValue;
    static getContentQuestionTypeRenderAs(question: Question, survey: SurveyPDF): string;
    static getContentQuestionType(question: Question, survey: SurveyPDF): string;
    static getPageAvailableWidth(controller: DocController): number;
    static getColumnWidth(controller: DocController, colCount: number, gapBetweenColumns: number): number;
    static setColumnMargins(controller: DocController, colCount: number, column: number, gapBetweenColumns: number): void;
    static moveRect(rect: IRect, left?: number, top?: number): IRect;
    static createRectInsideBorders(rect: IRect, borderWidth: number | Array<number>): IRect;
    static getFlatQuestion(survey: SurveyPDF, controller: DocController, question: Question): IFlatQuestion;
    static generateQuestionFlats(survey: SurveyPDF, controller: DocController, question: Question, point: IPoint): Promise<IPdfBrick[]>;
    static generatePanelFlats(survey: SurveyPDF, controller: DocController, panel: PanelModel, point: IPoint): Promise<IPdfBrick[]>;
    static generatePageFlats(survey: SurveyPDF, controller: DocController, page: PageModel, point: IPoint): Promise<IPdfBrick[]>;
    static isFontExist(controller: DocController, fontName: string): boolean;
    static isCustomFont(controller: DocController, fontName: string): boolean;
    static fixFont(controller: DocController): void;
    static clone(src: any): any;
    static shouldRenderReadOnly(question: IQuestion, controller: DocController, readOnly?: boolean): boolean;
    static isSizeEmpty(val: any): boolean;
    static isHeightEmpty(val: any): boolean;
    static getCorrectedImageSize(controller: DocController, imageOptions: {
        imageWidth?: any;
        imageHeight?: any;
        imageLink: string;
        defaultImageWidth?: any;
        defaultImageHeight?: any;
    }): Promise<ISize>;
    static alignVerticallyBricks(align: 'top' | 'center' | 'bottom', ...bricks: IPdfBrick[]): void;
    static clear(): void;
}
