import { Destructor, status } from '@synnaxlabs/x';
import { z } from 'zod';
import { State } from './state';
export interface RemoveFunc {
    (path: string): void;
}
export interface SetOptions {
    notifyOnChange?: boolean;
    markTouched?: boolean;
}
export interface SetFunc {
    (path: string, value: unknown, options?: SetOptions): void;
}
export interface Listener {
    (): void;
}
export interface BindFunc {
    (props: Listener): Destructor;
}
export type Mode = "normal" | "preview";
export interface ContextValue<Z extends z.ZodType = z.ZodType> {
    mode: Mode;
    bind: BindFunc;
    set: SetFunc;
    get: typeof State.prototype.getState;
    reset: (values?: z.infer<Z>) => void;
    remove: RemoveFunc;
    value: () => z.infer<Z>;
    validate: (path?: string) => boolean;
    validateAsync: (path?: string) => Promise<boolean>;
    has: (path: string) => boolean;
    setStatus: typeof State.prototype.setStatus;
    clearStatuses: () => void;
    setCurrentStateAsInitialValues: () => void;
    getStatuses: () => status.Crude[];
}
export declare const Context: import('react').Context<ContextValue<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>> | null>;
export declare const useContext: <Z extends z.ZodType = z.ZodType>(override?: ContextValue<Z>, funcName?: string) => ContextValue<Z>;
//# sourceMappingURL=Context.d.ts.map