import { Draft } from 'immer';
export type EnhancedStateController<T> = {
    [key: string]: (state: Draft<T>, payload: any) => void;
};
export type EnhancedStateDispatch<T extends Record<string, (state: any, payload: any) => void>> = {
    [Key in keyof T]: Parameters<T[Key]>['1'] extends undefined ? () => EnhancedStateDispatch<T> : (payload: Parameters<T[Key]>['1']) => EnhancedStateDispatch<T>;
};
export type EnhanceFunction = <T, K extends {
    [key: string]: (state: Draft<T>, payload: any) => void;
}>(state: T, controller: K, store_name?: string) => {
    state: T;
    dispatch: {
        [Property in keyof typeof controller]: Parameters<(typeof controller)[Property]>['1'] extends undefined ? () => EnhancedStateDispatch<K> : (payload: Parameters<(typeof controller)[Property]>['1']) => EnhancedStateDispatch<K>;
    };
};
export declare const useEnhancedState: EnhanceFunction;
