///
import { ComponentClass } from "react";
import { ReactComponent, ReactAnyComponent } from "./types";
export declare type StateUpdater = (newState: T, callback?: () => void) => void;
export declare type StaticCallback = (componentClass: ComponentClass, target: ReactComponent | string) => void;
export declare type LifeCycleCallbackTypes = {
componentWillMountCallback?: (props: any, state: any, context: any) => () => void;
componentDidMountCallback?: (props: any, state: any, context: any) => () => void;
componentWillUnmountCallback?: (props: any, state: any, context: any) => () => void;
componentWillReceivePropsCallback?: (props: any, state: any, context: any) => () => void;
shouldComponentUpdateCallback?: (props: any, state: any, context: any) => () => boolean;
componentWillUpdateCallback?: (props: any, state: any, context: any) => () => void;
componentDidUpdateCallback?: (props: any, state: any, context: any) => () => void;
};
export declare type InstanceCallbackTypes = LifeCycleCallbackTypes & {
lazyLoadCallback?: (props: any, state: any, context: any) => InstanceCallbackList;
propsCallback?: (props: any, state: any, context: any) => any;
childContextCallback?: (childContext: any, props: any, state: any, context: any) => any;
stateCallback?: (initState: (name: string, value: any) => {
name: string;
updater: StateUpdater;
}, props: any, state: any, context: any) => void;
skipCallback?: (props: any, state: any, context: any) => number;
renderCallback?: (component: ReactAnyComponent, props: any, state: any, context: any) => ReactAnyComponent;
};
export declare type InstanceCallbackEntry = {
kind: T;
callback: InstanceCallbackTypes[T];
};
export declare type InstanceCallbackList = Array>;
export declare type InstanceCallbackListTypesafe = Array | InstanceCallbackEntry<"propsCallback"> | InstanceCallbackEntry<"stateCallback"> | InstanceCallbackEntry<"childContextCallback"> | InstanceCallbackEntry<"skipCallback"> | InstanceCallbackEntry<"renderCallback"> | InstanceCallbackEntry<"componentWillMountCallback"> | InstanceCallbackEntry<"componentDidMountCallback"> | InstanceCallbackEntry<"componentWillUnmountCallback"> | InstanceCallbackEntry<"componentWillReceivePropsCallback"> | InstanceCallbackEntry<"shouldComponentUpdateCallback"> | InstanceCallbackEntry<"componentWillUpdateCallback"> | InstanceCallbackEntry<"componentDidUpdateCallback">>;
export declare type ComponentCallbacks = {
staticCallback?: StaticCallback;
instanceCallbacks?: (() => InstanceCallbackList) | InstanceCallbackList;
};
export declare type Composable = ComponentCallbacks | ComponentCallbacks[];
export declare type CallbackEntryHelper = (callback: InstanceCallbackTypes[T]) => InstanceCallbackEntry;
export declare const lazyLoadCallback: CallbackEntryHelper<"lazyLoadCallback">;
export declare const propsCallback: CallbackEntryHelper<"propsCallback">;
export declare const stateCallback: CallbackEntryHelper<"stateCallback">;
export declare const childContextCallback: CallbackEntryHelper<"childContextCallback">;
export declare const skipCallback: CallbackEntryHelper<"skipCallback">;
export declare const renderCallback: CallbackEntryHelper<"renderCallback">;
export declare const componentWillMountCallback: CallbackEntryHelper<"componentWillMountCallback">;
export declare const componentDidMountCallback: CallbackEntryHelper<"componentDidMountCallback">;
export declare const componentWillUnmountCallback: CallbackEntryHelper<"componentWillUnmountCallback">;
export declare const componentWillReceivePropsCallback: CallbackEntryHelper<"componentWillReceivePropsCallback">;
export declare const shouldComponentUpdateCallback: CallbackEntryHelper<"shouldComponentUpdateCallback">;
export declare const componentWillUpdateCallback: CallbackEntryHelper<"componentWillUpdateCallback">;
export declare const componentDidUpdateCallback: CallbackEntryHelper<"componentDidUpdateCallback">;
export declare type Blueprint = {
staticCallbacks?: StaticCallback[];
instanceCallbacks?: () => InstanceCallbackListTypesafe;
};
export declare function createBlueprint(...composables: Composable[]): Blueprint;