import type { GetWalletConfigResponse } from '../api/api-gateway-internal';
import { ApiInternal } from '../api/api-internal';
import type { Container } from '../components/container';
import type { EventEmitter } from '../helper/event-emitter';
import { type IPayPalSavePaymentSourceWidget, type PayPalSavePaymentSourceWidgetConfig } from './paypal-save-payment-source.interfaces';
declare global {
    interface Window {
        paypal: any;
    }
}
export declare class PayPalSavePaymentSourceService implements IPayPalSavePaymentSourceWidget {
    protected publicKey: string;
    protected gatewayId: string;
    protected eventEmitter: EventEmitter;
    protected config?: PayPalSavePaymentSourceWidgetConfig;
    protected paypal: any;
    protected api: ApiInternal;
    protected walletConfig: GetWalletConfigResponse;
    protected idToken: string;
    constructor(publicKey: string, gatewayId: string, eventEmitter: EventEmitter, config?: PayPalSavePaymentSourceWidgetConfig);
    static fromConfig(publicKey: string, gatewayId: string, eventEmitter: EventEmitter, config?: PayPalSavePaymentSourceWidgetConfig): PayPalSavePaymentSourceService;
    private getApiAuthType;
    setEnv(env: string, alias?: string): void;
    load(container: Container): void;
    private renderPaypalSavePaymentSourceComponent;
    private getClientAuthFromWalletConfig;
    private getSetupToken;
    protected onObtainedVaultSetupToken(vaultSetupToken: string): Promise<void>;
    protected onErrorVaultSetupToken(error: any): void;
    protected onCancelVaultSetupToken(): void;
    private getIdToken;
    private getWalletConfig;
    private extractErrorDetails;
}
//# sourceMappingURL=paypal-save-payment-source.service.d.ts.map