import { Root } from 'react-dom/client';
import { Widget, Checkout, WidgetProperties, WidgetType, WidgetEventData, WidgetParameters, WrappedBrowserProvider } from '@imtbl/checkout-sdk';
import { StrongCheckoutWidgetsConfig } from '../lib/withDefaultWidgetConfig';
export declare abstract class Base<T extends WidgetType> implements Widget<T> {
    protected checkout: Checkout;
    protected targetId?: string;
    protected reactRoot?: Root;
    protected widgetElement?: HTMLElement;
    protected properties: WidgetProperties<T>;
    protected parameters: WidgetParameters[T];
    protected browserProvider: WrappedBrowserProvider | undefined;
    protected eventHandlers: Map<keyof WidgetEventData[T], Function>;
    protected eventHandlersFunction?: (event: any) => void;
    protected eventTopic: string;
    constructor(sdk: Checkout, props: WidgetProperties<T>);
    private setLanguage;
    unmount(): void;
    mount(id: string, params?: WidgetParameters[T]): void;
    update(props: WidgetProperties<T>): void;
    addListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName, callback: (data: WidgetEventData[T][KEventName]) => void): void;
    removeListener<KEventName extends keyof WidgetEventData[T]>(type: KEventName): void;
    protected strongConfig(): StrongCheckoutWidgetsConfig;
    protected abstract render(): void;
    protected abstract getValidatedProperties(props: WidgetProperties<T>): WidgetProperties<T>;
    protected abstract getValidatedParameters(params: WidgetParameters[T]): WidgetParameters[T];
    private setupProviderUpdatedListener;
    private setupDisconnectProviderListener;
    private handleEIP1193ProviderEvents;
    /**
     * Handles the PROVIDER_UPDATED event by and sets browserProvider on widgetRoot
     * This must unsubscribe and re-subscribe to EIP-1193 events on the underlying provider
     * After setting the new browserProvider, render the widget again.
     */
    private handleProviderUpdatedEvent;
    /**
     * Handles disconnect event from the wallet widget
     */
    private handleDisconnectEvent;
}
