interface RunApiParams {
    [key: string]: any;
}
export declare enum ActionType {
    Pay = "pay",
    Refund = "refund",
    Query = "query"
}
interface UsePaymentOptions {
    /**
     * 支付接口
     */
    payApi: (params: RunApiParams, options?: {
        signal?: AbortSignal;
    }) => Promise<any>;
    /**
     * 退款接口
     */
    refundApi?: (params: RunApiParams, options?: {
        signal?: AbortSignal;
    }) => Promise<any>;
    /**
     * 查询接口
     */
    checkApi: (params: {
        number: string;
    }, options?: {
        signal?: AbortSignal;
    }) => Promise<any>;
    /**
     * 检查是否应该继续处理结果（用于处理网络断开、组件卸载等情况）
     */
    shouldContinue?: () => boolean;
}
interface RunParams {
    /** 支付类型 */
    paymentType: ActionType;
    /** 支付交易号 */
    paymentNum: string;
    /** 订单ID */
    orderId?: string | number;
    /** 设备ID */
    deviceId?: string | number;
    /** 支付参数 */
    params: RunApiParams;
    /** 回调方法 */
    callbacks: RunCallbacks;
}
interface RunCallbacks {
    /**
     * 成功回调
     */
    onSuccess: (res: any) => void;
    /**
     * 失败回调
     */
    onError: (error: any) => void;
}
export declare const usePayment: (options: UsePaymentOptions) => {
    run: (options: RunParams) => Promise<void>;
    stop: () => void;
    clean: (params?: {
        clearCallbacks?: boolean;
    }) => void;
};
export {};
