import { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';
declare type Action<T = any> = {
    type: T;
};
declare type ActionCreator<A, P extends any[] = any[]> = {
    (...args: P): A;
};
declare type EnhancerOptions = {
    name?: string;
    actionCreators?: ActionCreator<any>[] | {
        [key: string]: ActionCreator<any>;
    };
    latency?: number;
    maxAge?: number;
    serialize?: boolean | {
        options?: undefined | boolean | {
            date?: true;
            regex?: true;
            undefined?: true;
            error?: true;
            symbol?: true;
            map?: true;
            set?: true;
            function?: true | ((fn: (...args: any[]) => any) => string);
        };
        replacer?: (key: string, value: unknown) => any;
        reviver?: (key: string, value: unknown) => any;
        immutable?: any;
        refs?: any;
    };
    actionSanitizer?: <A extends Action>(action: A, id: number) => A;
    stateSanitizer?: <S>(state: S, index: number) => S;
    actionsBlacklist?: string | string[];
    actionsWhitelist?: string | string[];
    actionsDenylist?: string | string[];
    actionsAllowlist?: string | string[];
    predicate?: <S, A extends Action>(state: S, action: A) => boolean;
    shouldRecordChanges?: boolean;
    pauseActionType?: string;
    autoPause?: boolean;
    shouldStartLocked?: boolean;
    shouldHotReload?: boolean;
    shouldCatchErrors?: boolean;
    features?: {
        pause?: boolean;
        lock?: boolean;
        persist?: boolean;
        export?: boolean | 'custom';
        import?: boolean | 'custom';
        jump?: boolean;
        skip?: boolean;
        reorder?: boolean;
        dispatch?: boolean;
        test?: boolean;
    };
    trace?: boolean | (<A extends Action>(action: A) => string);
    traceLimit?: number;
};
declare type Config = EnhancerOptions & {
    type?: string;
};
declare module '../vanilla' {
    interface StoreMutators<S, A> {
        'zustand/devtools': WithDevtools<S>;
    }
}
declare type Write<T, U> = Pick<T, Exclude<keyof T, keyof U>> & U;
declare type TakeTwo<T> = T extends [
] ? [
    undefined,
    undefined
] : T extends [
    unknown
] ? [
    /*a0*/ ...T,
    /*a1*/ undefined
] : T extends [
    unknown?
] ? [
    /*a0*/ ...T,
    /*a1*/ undefined
] : T extends [
    unknown,
    unknown
] ? T : T extends [
    unknown,
    unknown?
] ? T : T extends [
    unknown?,
    unknown?
] ? T : T extends [
    infer A0,
    infer A1,
    ...unknown[]
] ? [
    A0,
    A1
] : T extends [
    infer A0,
    (infer A1)?,
    ...unknown[]
] ? [
    A0,
    A1?
] : T extends [
    (infer A0)?,
    (infer A1)?,
    ...unknown[]
] ? [
    A0?,
    A1?
] : never;
declare type WithDevtools<S> = Write<S, StoreDevtools<S>>;
declare type StoreDevtools<S> = S extends {
    setState: (...a: infer Sa) => infer Sr;
} ? {
    setState<A extends string | {
        type: unknown;
    }>(...a: [
        /*a*/ ...TakeTwo<Sa>,
        /*action*/ A
    ]): Sr;
} : never;
export interface DevtoolsOptions extends Config {
    enabled?: boolean;
    anonymousActionType?: string;
}
declare type Devtools = <T, Mps extends [
    StoreMutatorIdentifier,
    unknown
][] = [
], Mcs extends [
    StoreMutatorIdentifier,
    unknown
][] = [
]>(initializer: StateCreator<T, [
    ...Mps,
    [
        'zustand/devtools',
        never
    ]
], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [
    [
        'zustand/devtools',
        never
    ],
    ...Mcs
]>;
declare module '../vanilla' {
    interface StoreMutators<S, A> {
        'zustand/devtools': WithDevtools<S>;
    }
}
export declare type NamedSet<T> = WithDevtools<StoreApi<T>>['setState'];
export declare const devtools: Devtools;
export {};
