import { EventEmitter } from '../../../stencil-public-runtime';
import { ITemplate, ITemplateField, TFieldType, VerdocsEndpoint } from '@verdocs/js-sdk';
import { IDocumentPageInfo } from '../../../utils/Types';
import { SDKError } from '../../../utils/errors';
/**
 * Displays a builder experience for laying out fields in a template. Note that this experience requires a large display area to
 * present all of the required controls, so it is primarily intended to be used in desktop environments.
 */
export declare class VerdocsTemplateFields {
    private templateListenerId;
    /**
     * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
     */
    endpoint: VerdocsEndpoint;
    /**
     * The ID of the template to create the document from.
     */
    templateId: string | null;
    /**
     * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
     * component renders, the toolbar will be removed from its default location and placed in the target element.
     * This allows the parent application to more easily control its placement and scroll effects.
     *
     * The movement of the toolbar to the target container is not dynamic - it is performed only on the initial
     * render. Host applications should not conditionally render this container. If the toolbar's visibility must
     * be externally controlled, use CSS display options to hide/show it instead.
     */
    toolbarTargetId: string | null;
    /**
     * Event fired if an error occurs. The event details will contain information about the error. Most errors will
     * terminate the process, and the calling application should correct the condition and re-render the component.
     */
    sdkError: EventEmitter<SDKError>;
    /**
     * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
     */
    templateUpdated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        template: ITemplate;
        event: string;
    }>;
    fieldsUpdated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        templateId: string;
        event: 'added' | 'deleted' | 'updated';
        fields: ITemplateField[];
    }>;
    placing: TFieldType | null;
    showMustSelectRole: boolean;
    selectedRoleName: string;
    loading: boolean;
    template: ITemplate | null;
    pageHeights: Record<number, number>;
    onTemplateIdChanged(): void;
    handleKeyDown(ev: KeyboardEvent): void;
    componentWillLoad(): Promise<void>;
    componentDidRender(): void;
    componentWillUpdate(): void;
    disconnectedCallback(): void;
    listenToTemplate(): Promise<void>;
    unlistenToTemplate(): void;
    attachFieldAttributes(pageInfo: IDocumentPageInfo, field: ITemplateField, el: HTMLInputElement): void;
    cachedPageInfo: Record<number, IDocumentPageInfo>;
    handlePageRendered(e: any): void;
    makeDraggable(el: HTMLElement): void;
    handleMoveField(event: any): Promise<void>;
    handleMoveEnd(event: any): Promise<void>;
    generateFieldName(type: string, pageNumber: number): string;
    viewCoordinatesToPageCoordinates(viewX: number, viewY: number, pageNumber: number, xMax: number, yMax: number): {
        x: number;
        y: number;
    };
    handleClickPage(e: any, pageNumber: number): Promise<void>;
    render(): any;
}
