import { IKBAQuestion, ISignerTokenResponse } from '@verdocs/js-sdk';
import { EventEmitter } from '../../../stencil-public-runtime';
import { IEnvelope, IEnvelopeField, IRecipient, TAuthenticateRecipientRequest } from '@verdocs/js-sdk';
import { VerdocsEndpoint, TRecipientAuthMethod } from '@verdocs/js-sdk';
import { SDKError } from '../../../utils/errors';
/**
 * Display an envelope signing experience. This will display the envelope's attached
 * documents with signing fields overlaid on each page.
 *
 * The component will attempt to initiate a signing session and load the specified
 * envelope. If successful, the recipient's fields will be enabled and the user will
 * be able to sign the envelope's attached documents. If not, an `sdkError` will be
 * thrown and the component will be blank/empty. To provide the best user experience,
 * applications should capture and handle this error to provide the user with
 * instructions/options for next steps based on the application's design and workflow.
 *
 * Unlike other components, this will always create its own endpoint to manage the
 * session session. This endpoint will be included in event callbacks for the
 * convenience of host applications that may wish to make server calls using the
 * signer's credentials once signing is complete (e.g. to obtain copies of
 * the signed attachments.)
 *
 * ```ts
 * <verdocs-sign
 *   envelopeId={ENVELOPE_ID}
 *   roleId={ROLE_ID}
 *   inviteCode={INVITE_CODE}
 *   envelopeUpdated={({ detail }) => console.log('Envelope updated state:', detail) }
 *   onSdkError={({ detail }) => { console.log('SDK error', detail) }
 *   />
 * ```
 */
export declare class VerdocsSign {
    /**
     * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
     */
    endpoint: VerdocsEndpoint;
    /**
     * The ID of the envelope to sign.
     */
    envelopeId: string | null;
    /**
     * The ID of the role that will be signing e.g. 'Recipient 1'
     */
    roleId: string | null;
    /**
     * The invite code for the signer.
     */
    inviteCode: string | null;
    /**
     * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
     * component renders, the header 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 (e.g. "fixed").
     *
     * The movement of the header 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 header's visibility must
     * be externally controlled, use CSS display options to hide/show it instead.
     */
    headerTargetId: 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 envelope is loaded for the first time.
     */
    envelopeLoaded: EventEmitter<{
        endpoint: VerdocsEndpoint;
        envelope: IEnvelope;
    }>;
    /**
     * Event fired when the envelope is updated in any way.
     */
    envelopeUpdated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        envelope: IEnvelope;
        event: string;
    }>;
    recipient: IRecipient | null;
    hasSignature: boolean;
    nextButtonLabel: string;
    nextSubmits: boolean;
    fatalErrorHeader: string;
    fatalErrorMessage: string;
    focusedField: string;
    disclosure: string;
    submitting: boolean;
    submitted: boolean;
    isDone: boolean;
    showDone: boolean;
    showLoadError: boolean;
    finishLater: boolean;
    showFinishLater: boolean;
    agreed: boolean;
    documentsSingularPlural: string;
    authStep: string | null;
    authMethodStates: Partial<Record<TRecipientAuthMethod, string>>;
    kbaQuestions: IKBAQuestion[] | null;
    showSpinner: boolean;
    kbaChoices: any[];
    loading: boolean;
    envelope: IEnvelope | null;
    componentWillLoad(): void;
    componentDidLoad(): Promise<void>;
    componentDidRender(): void;
    processAuthResponse(response: ISignerTokenResponse): void;
    handleClickAgree(): void;
    handleOptionSelected(e: any): Promise<void>;
    updateRecipientFieldValue(fieldName: string, updateResult: any): void;
    saveFieldChange(fieldName: string, fields: Record<string, any>): void;
    handleFieldChange(field: IEnvelopeField, e: any): Promise<void>;
    isFieldFilled(field: IEnvelopeField): boolean;
    isFieldValid(field: IEnvelopeField): boolean;
    getSortedFillableFields(): IEnvelopeField[];
    handleNext(): Promise<void>;
    getRecipientFields(): IEnvelopeField[];
    checkRecipientFields(): void;
    attachFieldAttributes(pageInfo: any, field: any, el: any): void;
    handlePageRendered(e: any): void;
    handleAuthenticateSigner(params: TAuthenticateRecipientRequest): void;
    render(): any;
}
