import React from 'react';
import { Bridge } from './Bridge';
import { BehaviorSubjectProxy } from 'rxjs-proxify';
export interface IDappStateProps<T> {
    sharedState: {
        [name: string]: T;
    };
    id?: string;
    defaultState?: T;
    changeSharedState?: (newStateData: Partial<T>, id?: string) => Promise<void>;
}
declare function dappletState<T>(WrappedComponent: any): {
    new (props: any): {
        bridge: Bridge<{
            changeSharedState: (newStateData: T, id?: string | undefined) => Promise<void>;
        }>;
        componentDidMount(): void;
        componentWillUnmount(): void;
        changeSharedState: (newStateData: T, id?: string | undefined) => Promise<void>;
        render(): JSX.Element;
        context: any;
        setState<K extends "loading" | "sharedState" | "id" | "defaultState">(state: {
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        } | ((prevState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>, props: Readonly<any>) => {
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        } | Pick<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }, K> | null) | Pick<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }, K> | null, callback?: (() => void) | undefined): void;
        forceUpdate(callback?: (() => void) | undefined): void;
        readonly props: Readonly<any> & Readonly<{
            children?: React.ReactNode;
        }>;
        state: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>;
        refs: {
            [key: string]: React.ReactInstance;
        };
        shouldComponentUpdate?(nextProps: Readonly<any>, nextState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>, nextContext: any): boolean;
        componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
        getSnapshotBeforeUpdate?(prevProps: Readonly<any>, prevState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>): any;
        componentDidUpdate?(prevProps: Readonly<any>, prevState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>, snapshot?: any): void;
        componentWillMount?(): void;
        UNSAFE_componentWillMount?(): void;
        componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
        UNSAFE_componentWillReceiveProps?(nextProps: Readonly<any>, nextContext: any): void;
        componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>, nextContext: any): void;
        UNSAFE_componentWillUpdate?(nextProps: Readonly<any>, nextState: Readonly<{
            loading: boolean;
            sharedState: {
                [contextId: string]: BehaviorSubjectProxy<T>;
            };
            id?: string | undefined;
            defaultState?: T | undefined;
        }>, nextContext: any): void;
    };
    contextType?: React.Context<any> | undefined;
};
export default dappletState;
