import { IElementStatus } from '../../../foundation';
import { CashierSdkActionQueryResult, Ianalytics, IPaymentSessionMetaData } from '../../../types';
import { ContainerController } from './elementContainerService/containerService';
import { ELEMENT_ENVIRONMENT_TYPE, EventCallbackCode, IElementOptions, IToastOptions } from './type';
export declare const formatElementOption: (options: IElementOptions) => {
    environment: ELEMENT_ENVIRONMENT_TYPE;
    sessionData: string;
    locale?: string;
    version?: string;
    appearance?: {
        theme: import("./type").ThemeType.Default | import("./type").ThemeType.Night;
    };
    onEventCallback?: ({ code, message, result }: {
        code: EventCallbackCode;
        message: string;
        result?: any;
    }) => void;
    loading?: {
        onStartLoading: () => void;
        onEndLoading: () => void;
    };
};
export declare const validateElementOption: (options: IElementOptions) => {
    isValid: boolean;
    errors: any[];
};
/**
 * 校验渲染条件
 * 1.校验当前 sdkSelector 结点是否存在
 * 2.校验当前 Element 的状态是否能够渲染
 * 3.校验当前 type 类型 Elment 是否已经执行过 mount
 */
export declare function checkCanMount({ sdkSelector, containerService, status, }: {
    sdkSelector: string;
    containerService: ContainerController;
    status: IElementStatus;
}): {
    success: boolean;
    errorMsg?: string;
    error?: {
        code: string;
        message: string;
    };
};
export declare function checkCanUpdate({ status, paymentContainerService, newPaymentSessionData, oldPaymentSessionData, }: {
    status: IElementStatus;
    paymentContainerService: ContainerController;
    newPaymentSessionData: string;
    oldPaymentSessionData: string;
}): boolean;
export declare function generateIframeSrc({ paymentSessionObj, paymentSession, instanceId, environment, appVersion, analytics, locale, pageUrl, link, }: {
    paymentSessionObj: IPaymentSessionMetaData;
    paymentSession: string;
    environment: string;
    analytics: Ianalytics;
    locale: string;
    instanceId: string;
    pageUrl: string;
    appVersion: string;
    link?: string;
}): string;
export declare function handleRedirect(data: any, fromFastSdk: boolean, eventCallback: ({ code, message }: {
    code: any;
    message: any;
}) => void): void;
export declare function redirect(data: {
    normalUrl?: string;
    schemeUrl?: string;
    applinkUrl?: string;
    callAppJudgeTime?: number;
}): Promise<void>;
export declare function showToast(options?: IToastOptions, callback?: Function): void;
export declare const isElementMobile: () => boolean;
/**
 * @description judge whether the device is a pad, by userAgent and screen aspect ratio, but not accurate
 */
export declare const isElementPad: () => boolean;
export declare const isElementPC: () => boolean;
/**
 * 判断是否需要加载错误页
 * @param {CashierSdkActionQueryResult} params
 * @returns {boolean} - 是否需要加载错误页
 */
export declare const isLoadErrorPage: (params: CashierSdkActionQueryResult) => boolean;
export declare const safeStringify: (payload: any, defaultValue?: string) => string;
export declare const safeParse: (payload: any, defaultValue?: Record<string, any>) => Record<string, any>;
