import { ActionReducerMapBuilder, AsyncThunk, Draft, PayloadAction } from '@reduxjs/toolkit';
import { BaseModel } from '../models/BaseModel';
type Opts<T, InitialState = any, MappedState = any> = {
    key: keyof T;
    dataKey?: string;
    mapper?: (value: InitialState) => MappedState;
};
type LinkThunkToStateOpts<T, InitialState = any, MappedState = any> = {
    mapper?: (value: InitialState, state?: InitialState) => MappedState;
};
type PayloadActionCreatorSimple<InitialState, Payload> = (state: Draft<InitialState>, { payload }: PayloadAction<Payload>) => void;
type PayloadActionCreatorArr<InitialState, Payload> = (state: Draft<InitialState>, { payload }: PayloadAction<Payload[]>) => void;
type PayloadActionCreatorObj<InitialState, Payload> = (state: Draft<InitialState>, { payload }: PayloadAction<Payload>) => void;
type ValueOf<T> = T[keyof T];
type NoStringIndex<T> = {
    [K in keyof T as string extends K ? never : K]: T[K];
};
export type GeneratedReduces<InitialState> = Record<`set${Capitalize<string & keyof NoStringIndex<InitialState>>}`, (payload: any) => void> & Record<'setAll', (payload: Partial<InitialState>) => void>;
type GeneratorDataRet<InitialState> = Record<`set${Capitalize<string & keyof NoStringIndex<InitialState>>}`, (state: Draft<InitialState>, { payload }: PayloadAction<ValueOf<InitialState>>) => void> & Record<'setAll', (state: Draft<InitialState>, { payload }: PayloadAction<Partial<InitialState>>) => void> & Record<'resetState', (state: Draft<InitialState>) => void>;
export type WithInitialState<T> = {
    initialState?: Partial<Omit<T, 'initialState' | 'requestInProgress' | 'requestSuccess' | 'requestRejected'>> | null;
    requestInProgress: boolean;
    requestSuccess?: boolean;
    requestRejected?: boolean;
};
export declare const withInitialState: <T>(state: T) => T & WithInitialState<T>;
export declare class ReduxGenerator<T extends {}> {
    private doNotResetFields;
    constructor(opts?: {
        /**
         * A list of fields from the initial state that if passed when calling autogenerated resetState will be ignroed
         * */
        doNotResetFields: Array<keyof T>;
    });
    genAll(initialState: T): GeneratorDataRet<T>;
    inArrSetter<U>(key: keyof T): PayloadActionCreatorSimple<T, {
        el: U;
        idx: number;
    }>;
    arrSetter<U>(key: keyof T): PayloadActionCreatorArr<T, U>;
    objectSetter<U>(): PayloadActionCreatorObj<T, U>;
    primitiveSetter<U extends boolean | string | number | object>(key: keyof T): PayloadActionCreatorSimple<T, U>;
    versionCheck(builder: ActionReducerMapBuilder<T>, initialState: any, key: string): void;
    versionCheckForSubReducer(builder: ActionReducerMapBuilder<T>, initialState: any, key: string, subKey: string): void;
    linkThunk(builder: ActionReducerMapBuilder<T>, thunk: AsyncThunk<any, any, any>, opts: Opts<T> | Opts<T>[]): void;
    linkThunkToState<ThunkType extends BaseModel, ThunkReturn, ThunkConfig>(builder: ActionReducerMapBuilder<T>, thunk: AsyncThunk<Partial<any>, Partial<any>, Partial<any>>, // @todo VERIFY THIS WHY IT DOES NOT WORK PROPERLY
    opts?: LinkThunkToStateOpts<T>): void;
    removeById(key: keyof T): PayloadActionCreatorSimple<T, number>;
}
export {};
