import type AMSCheckout from '../../core/instance';
import type { EventPayload, EventPayloadContext, IappendIframeNodesParams, IMerchantAppointParam, Iselector } from '../../types';
import { ComponentSignEnum, DeviceIdParameter, DisplayTypeEnum, PlatformEnum } from '../../types';
type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: DisplayTypeEnum) => Promise<void>;
export default class ComponentApp {
    app: null | HTMLIFrameElement;
    AMSSDK: AMSCheckout;
    platform: PlatformEnum;
    _performanceData: any[];
    _loadAppPromiseResolve: ((value: boolean) => void) | null;
    _isInitComponent: boolean;
    private _globalData?;
    private popupApp?;
    private appDomain;
    private createIframeNode;
    private createPreloadIframeNode;
    private _selector;
    private _appVersion;
    private _isRetention;
    private _allowSubmitPayCallAhead;
    private _actionQueryPromise;
    private _actionSubmitPromise;
    private _renderParams;
    private _componentSign;
    private _appLocationSearch;
    private _renderDisplayType;
    private _multipleCallbackEvents;
    private _isAppWebview;
    private _isNativeAppWebview;
    _merchantAppointParam: IMerchantAppointParam;
    private _webAppHeartBeatTimeoutFn;
    private _hasRenderComponent;
    constructor(componentOption?: {
        appVersion?: string;
    });
    /**
     * @description Cancel listening and destroy the dom
     */
    logoutPlugin(): void;
    /**
     * @description When SDK registers plug-ins, it is a required function to receive SDK instances
     */
    applyPlugin(AMSSDK: AMSCheckout): void;
    private initLoggerMeta;
    /**
     * @description Set the rendering capability of the cashier plug-in. Different technology stacks have some differences in the packaging and use of rendering functions
     */
    setRender(renderFunc: IrenderFuncParams): void;
    setPreloadRender(renderFunc: any): void;
    private initSecurity;
    private logDeviceId;
    getDeviceIdAndLog(deviceIdParameter?: DeviceIdParameter, isPolling?: boolean): Promise<string>;
    /**
     * @description render iframe content
     */
    appendIframeNodes(componentSign: ComponentSignEnum, renderParams: IappendIframeNodesParams): Promise<void>;
    appendPreloadIframeNodes(componentSign: any, productSceneVersion: any): void;
    private setParameterDefaultValues;
    private renderInlineLoading;
    private renderPopupLoading;
    _createLoadAppPromise(loadTimeLimit?: number): Promise<unknown>;
    /**
     * @description Interface request
     */
    private createActionQueryPromise;
    private createSubmitPromise;
    private cleanElement;
    private createPreloadApp;
    /**
     * @description Create app
     */
    private createApp;
    private listener;
    private resizeListener;
    private createDialog;
    private getDeviceIdAndCallback;
    private getUserAgentAndCallback;
    private returnDataAndCallback;
    /**
     * @description Initialize subscription iframe message
     */
    private addEventListener;
    private removeEventListener;
    private elementEventCallback;
    /**
     * @description Processing messages from iframe
     */
    _handleAppMessage(data: EventPayload): void;
    private logEventCallback;
    private dismissLoadingFunc;
    private updateMaskCloseBtn;
    private handleSizeChanged;
    private handleAuthUrlInfo;
    private handleRedirect;
    private handleDeclareInfo;
    private handleDeclarePopWindowCallback;
    private handleAppHeartBeat;
    private isAppAttached;
    private isWindowVisible;
    private handleCloseBtnShow;
    private handleMaskCloseBtnShow;
    /**
     * @description Send message to SDK
     */
    dispatchToSDK(event: string, data: any, eventCallbackId?: string): void;
    /**
     * @description Send message to iframe
     */
    dispatchToApp(payload: {
        context: EventPayloadContext;
    }, targetElement?: any): any;
    /**
     * @description Subscribe to messages from SDK
     */
    private subscribeFromSDK;
    /**
     * @description Send rendering events to iframe
     */
    private sendRenderEvent;
    /**
     * @description close cashier
     */
    private cleanContainer;
    private hideComponentAnimation;
    private closeBtnFunc;
    private retentionPopupLeaveFunc;
    private removeRetentionPopup;
    private showRetentionPopup;
    private hideRetentionPopupFunc;
    private submitForm;
    shouldValidateFields(): boolean;
}
export {};
