/**
 * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, and/or distribute the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 * 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
 * 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
 */
import { IApplePayContactField } from '../plugin/applepay/interface';
export type onChange = () => onCnageResult;
export { type IElementOptions, ElementType, PaymentElementLayout, ThemeType } from '../core/component/element/type';
interface onCnageResult {
    complete: boolean;
    addressValue: AddressItem[];
    selectIndex: number | string;
}
export type getValue = (hasValidate: boolean) => Promise<AddressValueResult>;
interface AddressValueResult {
    complete: boolean;
    value: AddressItem;
}
/**
 * SDK options
 */
export interface IoptionsParams {
    environment?: string;
    locale?: string;
    onError?: callOnError;
    onSizeChanged?: callOnSizeChanged;
    onPaymentMethodSelected?: callonPaymentMethodSelected;
    onLog?: callOnLog;
    onEventCallback?: callOnEventCallback;
    onClose?: callOnClose;
    onChange?: onChange;
    analytics?: {
        enabled: boolean;
    };
    onBeforeSubmit?: callOnBeforeSubmit;
    product?: string;
    networkMode?: string;
    mode?: string;
    securityRegion?: 'US' | 'SG' | 'DE';
}
export interface ValidationResult {
    isValid: boolean;
}
export interface IPreloadOptions {
    environment?: string;
    securityRegion?: 'US' | 'SG' | 'DE';
}
export interface IApplePayOptionsParams extends Pick<IoptionsParams, 'locale' | 'environment' | 'onEventCallback' | 'analytics'> {
}
export type Iselector = string;
export declare enum DisplayTypeEnum {
    'popup' = "popup",
    'inline' = "inline"
}
export interface IcreatePaymentParams {
    paymentMethodsResult?: any;
    sessionData?: string;
    selector: Iselector;
    appearance?: {
        displayType?: checkoutDisplayEnum;
        backgroundColor?: string;
    };
}
export declare enum ComponentSignEnumV2 {
    'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
    'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL"
}
export declare enum ComponentSignEnum {
    'EASY_PAY_WALLET' = "EASY_PAY_WALLET",
    'EASY_PAY_APM' = "EASY_PAY_APM",
    'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD",
    'CASHIER_PAYMENT_BANK' = "CASHIER_PAYMENT_BANK",
    'CASHIER_PAYMENT_APM' = "CASHIER_PAYMENT_APM",
    'AUTO_DEBIT_WALLET' = "AUTO_DEBIT_WALLET",
    'AUTO_DEBIT_PAY_WALLET' = "AUTO_DEBIT_PAY_WALLET",
    'NONE' = "NONE",
    'VAULTING_CARD' = "VAULTING_CARD",
    'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT",
    'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT_ALL",
    'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS_ALL",
    'AUTO_DEBIT_APM' = "AUTO_DEBIT_APM"
}
export declare enum ProductSceneEnum {
    'EASY_PAY' = "EASY_PAY",
    'CASHIER_PAYMENT' = "CASHIER_PAYMENT",
    'AUTO_DEBIT' = "AUTO_DEBIT",
    'AUTO_DEBIT_PAY' = "AUTO_DEBIT_PAY",
    'VAULTING' = "VAULTING",
    'FLASH_BUY' = "FLASH_BUY",
    'CARD_APPLE_PAY' = "CARD_APPLE_PAY",
    'ELEMENT_PAYMENT' = "ELEMENT_PAYMENT",
    'ELEMENT_ADDRESS' = "ELEMENT_ADDRESS",
    'CHECKOUT_PAYMENT' = "CHECKOUT_PAYMENT"
}
export declare enum PaymentMethodCategoryTypeEnum {
    'CARD' = "CARD",
    'WALLET' = "WALLET",
    'BANK' = "BANK",
    'APM' = "APM",
    'ALL' = "ALL"
}
export interface DeviceIdParameter {
    scene?: string;
    productScene?: ProductSceneEnum;
    paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
    tokenCollectTime?: string;
    dataPollingInterval?: string;
}
export interface IcreateComponent {
    sessionData: string;
    paymentSessionData?: string;
    elementProps?: {
        elementLink: string;
    };
    appendAliasContainerId?: boolean;
    notRedirectAfterComplete?: boolean;
    appearance?: {
        [x: string]: any;
        themeType?: string;
        accentColor?: string;
    };
    isAppWebview?: boolean;
    merchantAppointParam?: IMerchantAppointParam;
    isNativeAppWebview?: boolean;
}
export interface IappendIframeNodesParams extends IcreateComponent {
    paymentSessionMetaData: IPaymentSessionMetaData;
    renderDisplayType: DisplayTypeEnum;
    selector?: Iselector;
    paypalConfiguration?: IPaypalConfiguration;
    /** 将address-element参数定义合入原参数定义 */
    configParams?: {
        hideFields?: string[];
        addressAutoSuggestDisabled?: addressAutoSuggestDisabledType;
    };
    prefillValue?: AddressItem[];
    componentSession?: string;
    loca?: string;
}
/** 表单地址数据 */
export interface AddressItem {
    shippingName: {
        firstName: string;
        lastName: string;
    };
    /** 手机号 */
    shippingPhoneNo: string;
    /** 地址 */
    shippingAddress: {
        /** 国家 */
        region: string;
        /** 地址1 */
        address1: string;
        /** 地址2 */
        address2: string;
        /** 省份 */
        province?: string;
        /** 城市 */
        city?: string;
        /** 地址级联 四层 【province,city,district,subDistrict】 */
        district?: string[];
        /** 邮政编码 */
        zipCode: string;
        /** 对应地址级联数据对象 */
        districtValues?: {
            /** 城市 */
            city?: string;
            /** 区/县 */
            district?: string;
            /** 省份 */
            province?: string;
            /** 子区域 */
            subDistrict?: string;
        };
    };
    /** 备注 */
    notes?: string;
    open?: boolean;
    /** 是否默认地址 */
    prefer?: '1' | '0';
    shippingId?: string;
}
type addressAutoSuggestDisabledType = 0 | 1;
export interface IPaypalConfiguration {
    style?: object;
    blockPayPalCreditButton?: boolean;
    blockPayPalPayLaterButton?: boolean;
    displayPayPalPayLaterButtonOnly?: boolean;
    enableMessages?: boolean;
    intent?: payPalConfigurationIntentEnum;
}
export declare enum payPalConfigurationIntentEnum {
    'intent' = "intent",
    'capture' = "capture"
}
export interface IMerchantAppointParam {
    storedCard?: IStoredCard;
}
export interface IStoredCard {
    needCVV?: boolean;
}
export interface IbillingAddress {
    region?: string;
    address1?: string;
    address2?: string;
    city?: string;
    state?: string;
    zipCode?: string;
}
export interface Isubmit {
    billingAddress?: IbillingAddress;
}
export interface IpaymentSessionConfig {
    productScene: ProductSceneEnum;
    paymentMethodCategoryType?: PaymentMethodCategoryTypeEnum;
    productSceneVersion: string;
}
export interface IpaymentSecurityConfig {
    appId: string;
    appName: string;
    bizToken: string;
    gateway: string;
    h5gateway: string;
    tokenCollectTime?: string;
    dataPollingInterval?: string;
    workSpaceId: string;
}
export interface IsecurityConfig {
    scene: string;
    h5gateway: string;
}
export interface InitSecurityConfig {
    product: ProductSceneEnum;
    region?: string;
    securityRegion?: 'US' | 'SG' | 'DE';
}
export interface frontModulesToBeLoadedInterface {
    acquirerName: string;
    scriptUrl: string;
}
type ActionDeviceInfo = {
    signType?: string;
};
export interface PaymentSessionActionData {
    amountConfirmRequired?: boolean;
    autoDebitWithToken: boolean;
    enableSignAgreement?: boolean;
    skipSdkQuery: boolean;
    requireFastSdk: boolean;
    nonCompliant?: boolean;
    nonInitSecuritySDK?: boolean;
    signButtonDisplay?: boolean;
    userSignAgreement?: boolean;
    skipSdkQueryForm?: {
        value: boolean;
        version: string;
        platform: string;
    };
    web: ActionDeviceInfo;
    wap: ActionDeviceInfo;
    app: ActionDeviceInfo;
}
export interface IPaymentSessionMetaData {
    clientId?: string;
    renderDisplayType?: string;
    paymentSessionConfig?: IpaymentSessionConfig;
    securityConfig?: IpaymentSecurityConfig;
    moneyView?: any;
    extendInfo?: string;
    paymentMethodInfoView?: any;
    paymentView?: any;
    action?: PaymentSessionActionData;
    authUrlInfo?: {
        appIdentifier?: string;
        applinkUrl?: string;
        normalUrl?: string;
        schemeUrl?: string;
        authUrl?: string;
    };
    paymentSessionFactor?: {
        externalRiskTimeout?: number;
        extendInfo?: {
            merchantCapabilities?: string[];
            supportedNetworks?: string[];
            requiredBillingContactFields: IApplePayContactField[];
            requiredShippingContactFields: IApplePayContactField[];
        };
        merchantInfo?: {
            registeredCountry?: string;
            partnerId?: string;
            merchantName?: string;
        };
        order?: {
            orderDescription: string;
        };
        paymentAmount?: {
            value?: string;
            currency?: string;
        };
        paymentMethodInfo?: {
            paymentMethodType?: string;
        };
        paymentMethodViewMetaData?: any;
        paymentRequestId?: string;
        supportedLanguages?: any;
        /**
         * 当前为苹果分期场景的信息
         */
        recurringInfo?: {
            /**
             * 代扣协议开始日期 不传为当前系统时间
             */
            startDate?: number;
            /**
             * 代扣协议结束日期 不传不限制结束时间
             */
            endDate?: number;
            /**
             * 付款时间间隔单位，支持："year" "month" "day" "hour" "minute" 不传默认month
             */
            intervalUnit?: string;
            /**
             * 付款时间间隔。比如每过6个月付款一次，intervalCount就是6, 不传默认为1
             */
            intervalCount?: number;
            /**
             * 分期标题信息
             */
            title?: string;
            /**
             * 分期管理页面
             */
            managementURL?: string;
            /**
             * 苹果通知ipay MAPN信息变更的地址
             */
            tokenNotificationURL?: string;
            /**
             * 分期协议描述
             */
            agreementDescription?: string;
        };
        frontModulesToBeLoaded?: frontModulesToBeLoadedInterface[];
    };
    connectFactor?: {
        enableConnect?: boolean;
    };
    skipRenderPaymentMethod?: boolean;
    needAccountConfirmPage?: boolean;
}
export interface IPaymentSessionFactor {
    merchantInfo?: IMerchantInfo;
    paymentMethodInfo: IPaymentMethodInfo;
    paymentAmount?: IPaymentAmount;
    paypal?: IPaypalConfig;
}
export interface IPaymentMethodInfo {
    paymentMethodMetaData?: IPaymentMethodMetaData;
    paymentMethodType?: PaypalMethodEnum;
}
export type IPaypalConfig = {
    accessToken: string;
};
export interface IPaymentMethodMetaData {
    bindPaymentMethod?: string;
    boundPaymentMethod?: string;
}
export interface IMerchantInfo {
    channelMerchantClientId?: string;
}
export interface IPaymentAmount {
    value?: string;
    currency?: PaymentAmountEnum;
}
export declare enum PaymentAmountEnum {
    USD = "USD"
}
export declare enum localeEnum {
    'en-US' = "en-US"
}
export declare enum checkoutDisplayEnum {
    horizon = "horizon",
    vertical = "vertical"
}
export declare enum modeEnum {
    dropin = "dropin",
    component = "component"
}
export declare enum networkModeEnum {
    proxy = "proxy",
    session = "session"
}
export interface IcheckoutState {
    paymentMethodType?: string;
}
export declare enum EnvironmentEnum {
    sandbox = "sandbox",
    prod = "prod",
    light_sandbox = "light_sandbox"
}
export declare enum osTypeEnum {
    IOS = "IOS",
    ANDROID = "ANDROID",
    ELSE = "ELSE"
}
export declare enum terminalTypeEnum {
    WEB = "WEB",
    WAP = "WAP",
    APP = "APP",
    MINI_APP = "MINI_APP"
}
export interface Ienv {
    osType?: osTypeEnum;
    terminalType: terminalTypeEnum;
    environment: string;
}
export declare enum PlatformEnum {
    desktop = "desktop",
    mobile = "mobile"
}
export type EventCallbackResult = {
    result?: {
        resultCode: string;
        resultStatus: string;
        resultMessage: string;
    };
    redirectUrls?: {
        applinkUrl?: string;
        schemeUrl?: string;
        normalUrl?: string;
    };
    paymentResultCode?: string;
    paymentResultMessage?: string;
    paymentStatus?: string;
} & Record<string, any>;
/**
 * @description Create an event handler, called when an error occurs in AMSCheckout.
 */
export type callOnError = (state: {
    code: string;
    message: string;
    stack?: any;
}) => void;
/**
 * @description Create an event handler, called when the general log triggers during the SDK runtime.
 */
export type callOnLog = (state: {
    code: string;
    message: string;
}) => void;
/**
 * @description Create an event handler, during the running of the sdk, some events are called after execution, and the specific event code is returned.
 */
export type callOnEventCallback = (state: {
    code: string;
    message?: string;
    result?: EventCallbackResult;
}) => void;
export type callonPaymentMethodSelected = (state: {
    paymentMethodType: string;
}) => void;
export type callOnSizeChanged = (state: {
    width: number;
    height: number;
}) => void;
export type onBeforeSubmitResult = {
    result: 'CANCEL' | 'CONTINUE' | 'ERROR' | 'IGNORE' | 'TIMEOUT';
    processType: string;
    submitRequestData: Record<string, any>;
};
export type callOnBeforeSubmit = (state?: Record<string, any>) => Promise<onBeforeSubmitResult> | onBeforeSubmitResult;
/**
 * @description Create an event handler, In pop-up layer mode, the user clicks the semi floating layer close button and is called.
 */
export type callOnClose = () => void;
export declare enum MessageName {
    SDK_TO_APP = "SDK_TO_APP",
    APP_TO_SDK = "APP_TO_SDK",
    APP_TO_APP = "APP_TO_APP"
}
export interface EventPayload {
    name: MessageName;
    mode?: string;
    appId?: string;
    instanceId: string;
    context: EventPayloadContext;
}
export interface EventPayloadContext {
    event: string;
    data: any;
    eventCallbackId?: string;
}
export interface AMSCheckoutOptions {
    env: Ienv;
    locale: string;
    networkMode: string;
    mode: string;
    analytics?: Ianalytics;
    product: string;
}
export interface Ianalytics {
    enabled: boolean;
}
export declare enum TargetEnum {
    BLANK = "_blank",
    SELF = "_self",
    REPLACE = "_replace"
}
export declare enum errorEnum {
    PARAMS = "PARAMS",
    TIMEOUT = "TIMEOUT",
    NETWORK = "NETWORK",
    SYSTEM = "SYSTEM",
    LOGIN = "LOGIN",
    GATEWAY = "GATEWAY",
    VALIDATION = "VALIDATION",
    TAOBAOBINDALIPAY = "TAOBAOBINDALIPAY",
    REGISTERWALLET = "REGISTERWALLET",
    NOALIPAYID = "NOALIPAYID",
    TRUSTLOGINERROR = "TRUSTLOGINERROR",
    SIGNIN = "SIGNIN",
    GETSIGNPARAMSERROR = "GETSIGNPARAMSERROR"
}
export interface RequestConfig {
    env?: string;
    baseURL?: string;
    timeout?: number;
    headers?: any;
    withCredentials?: boolean;
    method?: string;
    workspaceId?: string;
    'Operation-Type'?: string;
    beforerRequest?: () => void;
    afterRequest?: () => void;
    needEnvInfo?: boolean;
    hostSign?: string;
    appId?: string;
    sandbox?: boolean;
    deviceId?: string;
    locale?: string;
    envInfo?: Record<string, any>;
}
export interface CashierSdkActionQueryRequest {
    paymentSessionData: string;
    paymentSessionConfig?: IpaymentSessionConfig;
    paymentMethodType?: string;
    notRedirectAfterComplete?: boolean;
    merchantAppointParam?: IMerchantAppointParam;
    extParams?: any;
}
export interface CashierSubmitPayRequest {
    /**
     * @description payment method type
     */
    paymentMethodType?: string;
    /**
     * @description payment factors
     */
    paymentFactors?: Record<string, string>;
    /**
     * @description 需要验证的场景
     */
    verifyFactors?: Record<string, string>;
    paymentSessionData: string;
    paymentSessionConfig?: any;
    paymentMethod?: {
        paymentMethodType: string;
        paymentMethodId?: string;
        paymentMethodDetail?: Record<string, any>;
        category?: string;
    };
}
export interface CashierSubmitPayRequest {
    paymentMethodType?: string;
    paymentFactors?: Record<string, string>;
    verifyFactors?: Record<string, string>;
    paymentSessionData: string;
    paymentSessionConfig?: any;
    extParams?: any;
}
export interface CashierSdkActionQueryResult {
    supportedLanguages?: any[];
    amountConfirmRequired?: boolean;
    orderAmount?: Record<string, string>;
    paymentMethodView?: Record<string, string>;
    autoDebitWithToken?: boolean;
    success: boolean;
    errorCode?: string;
    errorMessage?: string;
    message?: string;
    errorStatus?: string;
    redirectUrl?: string;
    normalUrl?: string;
    applinkUrl?: string;
    schemeUrl?: string;
    authUrl?: string;
    extendInfo?: {
        channelOrderId?: string;
    };
    errorActions?: Record<string, string>;
    orderAmountView?: IAmountView;
    paymentAmountView?: IAmountView;
    paymentMethods?: IPaymentMethod[];
    savedPaymentMethods?: IPaymentMethod[];
    traceId?: string;
}
export interface CashierSdkActionQuerySessionResult extends IPaymentSessionMetaData {
    success: boolean;
    errorCode?: string;
    errorMessage?: string;
    message?: string;
    errorStatus?: string;
    traceId?: string;
}
/**
 * Get App Pay Payment Session Request.
 */
export interface ApplePayPaymentSessionRequest {
    validateUrl: string;
    paymentSessionData: string;
    merchantDomain?: string;
}
/**
 * Get App Pay Payment Session Result.
 */
export interface ApplePayPaymentSessionResult {
    merchantSessionObject: string;
    success: boolean;
    errorCode?: string;
    errorMessage?: string;
    message?: string;
}
export declare enum redirectTypeEnum {
    UNSAFE_BROWSER = "UNSAFE_BROWSER",// 非安全浏览器
    SAFETY_BROWSER = "SAFETY_BROWSER",// 安全浏览器
    INVOKE_SDK = "INVOKE_SDK"
}
export interface ActionForm {
    parameters: any;
    redirectUrl: any;
    elementValue?: string;
    redirectType?: redirectTypeEnum;
}
export interface CashierSubmitPayResult {
    success: boolean;
    resultCode?: string;
    resultMessage?: string;
    errorActions?: Record<string, string>;
    errorCode?: string;
    errorMessage?: string;
    extendInfo?: Record<string, string>;
    actionForm?: ActionForm;
    normalUrl?: string;
    errorStatus?: string;
    message?: string;
    traceId?: string;
}
export declare enum eventCodeEnum {
    SDK_START_OF_LOADING = "SDK_START_OF_LOADING",
    SDK_END_OF_LOADING = "SDK_END_OF_LOADING",
    SDK_INTERNAL_ERROR = "SDK_INTERNAL_ERROR",
    SDK_CREATEPAYMENT_PARAMETER_ERROR = "SDK_CREATEPAYMENT_PARAMETER_ERROR",
    SDK_INIT_PARAMETER_ERROR = "SDK_INIT_PARAMETER_ERROR",
    SDK_CREATECOMPONENT_ERROR = "SDK_CREATECOMPONENT_ERROR",
    /**
     * 拉取WEB应用&收银台失败
     */
    SDK_LAUNCH_PAYMENT_APP_ERROR = "SDK_LAUNCH_PAYMENT_APP_ERROR",
    /**
     * 拉取WEB应用&收银台成功
     */
    SDK_CALL_URL_SUCCESS = "SDK_CALL_URL_SUCCESS",
    /**
    @deprecated 已废弃 请使用SDK_LAUNCH_PAYMENT_APP_ERROR
    */
    SDK_CALL_URL_ERROR = "SDK_CALL_URL_ERROR",
    SDK_PAYMENT_SUCCESSFUL = "SDK_PAYMENT_SUCCESSFUL",
    SDK_PAYMENT_FAIL = "SDK_PAYMENT_FAIL",
    SDK_PAYMENT_ERROR = "SDK_PAYMENT_ERROR",
    SDK_PAYMENT_CANCEL = "SDK_PAYMENT_CANCEL",
    /**
     * 当前为Apple Pay发起了Pay请求，但是用户关闭了页面
     */
    SDK_PAYMENT_PROCESSING = "SDK_PAYMENT_PROCESSING",
    SDK_PAYMENT_WARN = "SDK_PAYMENT_WARN",
    SDK_PAYMENT_SHIPPINGCHANGE = "SDK_PAYMENT_SHIPPINGCHANGE",
    SDK_PAYMENT_APPROVE = "SDK_PAYMENT_APPROVE",
    /**
     * ESP createComponent时传参isNativeAppWebview:true，ESP外跳授权时透传此SDK给商户
     */
    SDK_REDIRECT = "SDK_REDIRECT"
}
export declare enum RedirectType {
    ApplinkUrl = "ApplinkUrl",
    SchemeUrl = "SchemeUrl",
    NormalUrl = "NormalUrl",
    Unknown = "Unknown"
}
declare global {
    interface Window {
        [key: string]: any;
    }
}
export interface CallbackEventInfo {
    enableCallback: boolean;
    eventName: string;
    eventResult?: any;
}
export interface MultipleCallbackEvents {
    [key: string]: CallbackEventInfo;
}
export declare enum PaypalMethodEnum {
    PAYPAL_CHECKOUT = "PAYPAL_CHECKOUT",
    PAYPAL_VAULT = "PAYPAL_VAULT",
    PAYPAL_PAYLATER = "PAYPAL_PAYLATER"
}
export type PaymentMethodTypeEnum = 'ApplePay';
export type ApplePaySubTypeEnum = 'ApplePayRecurringPayment';
export type SubPaymentMethodTypeEnum = ApplePaySubTypeEnum;
export declare enum ProductSceneVersion {
    V1 = "1.0",
    V2 = "2.0"
}
export type IAppendParams = {
    componentSign: ComponentSignEnum;
    iframeNodesParams: IappendIframeNodesParams;
};
interface ISubPaymentElementView {
    defaultText: string;
    defaultValue: string;
    elementMandatory: boolean;
    elementRegx?: string;
    elementType: string;
    extendInfo: string;
    paramIllegalText: string;
    paymentElementKey: string;
    title: string;
    validateFunction?: string;
    isPart?: boolean;
    isPartEnd?: boolean;
}
export interface IPaymentElement {
    defaultValue: string;
    elementMandatory: boolean;
    elementType: string;
    extendInfo: string;
    paymentElementKey: string;
    subPaymentElementView: ISubPaymentElementView[];
    title: string;
}
export declare enum InterActionTypeEnum {
    COLLECT_REDIRECT = "COLLECT_REDIRECT",
    SHOW_CODE = "SHOW_CODE",
    COLLECT_SHOW_CODE = "COLLECT_SHOW_CODE",
    REDIRECT = "REDIRECT"
}
export interface IAmount {
    amount?: string;
    currency: string;
    currencyLabel: string;
    formattedAmount?: string;
    formattedAmountWithCurrency?: string;
    value: string;
}
export interface IAmountView {
    currency: string;
    currencyDivider: string;
    currencyLabel: string;
    currencySymbolPosition: 'L' | 'R';
    formattedValue: string;
    value: string;
}
export type ApplePayPaymentRequest = {
    version?: number;
    supportedNetworks: string[];
    requiredBillingContactFields?: string[];
    requiredShippingContactFields?: string[];
    merchantInfo: {
        instMid: string;
        merchantName: string;
        countryCode: string;
    };
    paymentAmount: {
        value: string;
        currency: string;
    };
    order?: {
        orderDescription: string;
    };
    merchantCapabilities: string[];
};
export interface IPaymentMethod {
    paymentMethodKey?: string;
    antomPage?: string;
    redirectUrl?: string;
    icon?: string;
    iconName?: string;
    logoList?: Array<{
        cardBrand: string;
        logoUrl: string;
    }>;
    paymentMethod?: string;
    paymentMethodName: string;
    paymentMethodType: string;
    category?: string;
    paymentElements?: IPaymentElement[];
    paymentMethodId?: string;
    paymentMethodDetail?: {
        last4?: string;
        requireIssuerAuthentication?: string;
        applePayProps?: {
            paymentRequest: ApplePayPaymentRequest;
        };
    };
    interActionType?: InterActionTypeEnum;
    recommend?: boolean;
    expressCheckout?: boolean;
    webRedirectType?: string;
    paymentCurrencyList?: string[];
    paymentAmount?: IAmount;
    paymentAmountView?: IAmountView;
    paymentQuoteId?: string;
}
export declare enum ConnectErrorCode {
    RISK_REJECT = "RISK_REJECT",
    USER_AUTH_VERIFICATION_FAILED = "USER_AUTH_VERIFICATION_FAILED",
    USER_NOT_EXISTS = "USER_NOT_EXISTS"
}
export interface IoptionsAddressParams {
    environment?: string;
    locale?: string;
    onSizeChanged?: callOnSizeChanged;
    onChange?: onChange;
    analytics?: {
        enabled: boolean;
    };
    product?: string;
}
export declare enum RiskSdkInfoEnum {
    NEED = "need",
    NO_NEED = "noneed"
}
export type HandleCloseSource = 'behavior' | 'retention';
export declare enum EventLoggingEventId {
    OnlyClose = "OnlyClose",
    LeaveAnyWay = "LeaveAnyWay",
    ContinuePaying = "ContinuePaying"
}
export interface ErrorMessage {
    code: string;
    message: string;
    [key: string]: ErrorMessage | string;
}
