import { DisplayTypeEnum, IoptionsParams, IPaymentSessionMetaData, PlatformEnum, ProductSceneEnum, TargetEnum } from '../types';
/**
 * @author 谦彧 <zhangmian.zm@alipay.com>
 * @date 2024/9/17
 */
/**
 * Represent one transaction, each transaction has its own instance.
 */
export interface PaymentContext {
    initOptions: IoptionsParams;
    startBizFlowOptions: StartBizFlowOptions;
    displayInfo: DisplayInfo;
    paymentSession: string;
    paymentSessionId: string;
    paymentSessionObj: IPaymentSessionMetaData;
    sdkMetaData: SDKMetaData;
}
export interface StartBizFlowOptions {
    paymentSession: string;
    displayInfo?: Partial<DisplayInfo>;
    submitPayRequestExtra?: any;
    isAppWebview?: boolean;
    isNativeAppWebview?: boolean;
}
export declare class DisplayInfo {
    type: DisplayTypeEnum;
    platform: PlatformEnum;
    isRetention: boolean;
    selector: string;
    appearance?: Record<string, any>;
    appendAliasContainerId?: boolean;
    merchantAppointParam?: {
        storedCard: {
            needCVV: boolean;
        };
    };
    iframeStyle?: Partial<CSSStyleDeclaration>;
    notRedirectAfterComplete?: boolean;
    constructor();
}
/**
 * Provide unique logic for specified product, or specified product and its payment method.
 * Such as: EasySafePay, PayPal in Cashier
 */
export interface ProductProcessor {
    init(config: IoptionsParams, instanceId: string, sdkMetaData: SDKMetaData): any;
    startBizFlow(paymentContext: PaymentContext): Promise<BizFlowStartBehavior>;
}
export interface BizFlowStartBehavior {
    behaviorType: 'RENDER' | 'REDIRECT' | 'NONE';
    payload: RenderBehaviorPayload | RedirectBehaviorPayload;
    data?: any;
}
export interface RenderBehaviorPayload {
    url: string;
    allowClickPopupOutsideClose?: boolean;
}
export interface RedirectBehaviorPayload {
    url?: string;
    schemeUrl?: string;
    applinkUrl?: string;
    browserLinkTarget?: TargetEnum;
    isCallApp?: boolean;
    callAppDetectSuccessDelay?: number;
    openInApp?: boolean;
}
/**
 * Provide some capability, such as MonitorService, EventBusService, SecurityService
 */
export interface Service {
    init(initOptions: IoptionsParams, instanceId: string, sdkMetaData: SDKMetaData): any;
    update(paymentContext: PaymentContext): any;
    destroy(): any;
}
export interface SDKMetaData {
    productScene: ProductSceneEnum;
    sdkVersion: string;
    webAppVersion: string;
    greyscaleId?: number;
}
export interface EventLogging {
    enableLogging?: boolean;
    eventName?: string;
    eventAlias?: string;
    userPath?: string;
}
export interface InitContext {
    initOptions: IoptionsParams;
    sdkMetaData: SDKMetaData;
}
export declare enum IElementStatus {
    UNINIT = "UNINIT",
    INITING = "INITING",
    READY = "READY",
    IN_BIZ_FLOW = "IN_BIZ_FLOW",
    DESTROYED = "DESTROYED"
}
