import { ICreateEnvelopeRecipient, IRole, ITemplate, VerdocsEndpoint } from '@verdocs/js-sdk';
import { EventEmitter } from '../../../stencil-public-runtime';
import { SDKError } from '../../../utils/errors';
export type TVerdocsBuildStep = 'attachments' | 'roles' | 'settings' | 'fields' | 'preview';
/**
 * Display a template building experience. Several event callbacks provide status updates to the
 * parent application to support interface updates.
 *
 * ```ts
 * <verdocs-build
 *   templateId={TEMPLATE_ID} step="preview"
 *   onSend={({detail}) => { console.log('Sent envelope from template', detail) }}
 *   onSdkError={({ detail }) => { console.log('SDK error', detail) }
 *   />
 * ```
 */
export declare class VerdocsBuild {
    private templateListenerId;
    el: any;
    /**
     * 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. Unlike most other components, this is an optional parameter here.
     * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.
     * If it is not specified, `step` will be ignored and the create step will be shown.
     */
    templateId: string | null;
    /**
     * The step in the creation process to display.
     */
    step: TVerdocsBuildStep;
    /**
     * Event fired if the user clicks Cancel.
     */
    cancel: EventEmitter;
    /**
     * 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 user selects a different step.
     */
    stepChanged: EventEmitter<TVerdocsBuildStep>;
    /**
     * The user completed the Send form and clicked send.
     */
    send: EventEmitter<{
        recipients: ICreateEnvelopeRecipient[];
        name: string;
        template_id: string;
    }>;
    /**
     * 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;
    }>;
    /**
     * Event fired when the template is created by the upload step.
     */
    templateCreated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        template: ITemplate;
        event: string;
    }>;
    /**
     * Event fired when roles are updated in the roles step.
     */
    rolesUpdated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        templateId: string;
        event: 'added' | 'deleted' | 'updated';
        roles: IRole[];
    }>;
    loading: boolean;
    template: ITemplate | null;
    onTemplateIdChanged(newTemplateId: string, oldTemplateId: string): void;
    onStepChanged(): void;
    componentWillLoad(): Promise<void>;
    loadTemplate(templateId: string): Promise<void>;
    disconnectedCallback(): void;
    unlistenToTemplate(): void;
    handleCancel(): void;
    handleTemplateCreated(templateId: string): Promise<void>;
    handleRolesUpdated(e: any): Promise<void>;
    handleTemplateUpdated(e: any): Promise<void>;
    handleAttachmentsNext(): void;
    handleRolesNext(): void;
    handleStepChanged(step: TVerdocsBuildStep): void;
    render(): any;
}
