import { z } from 'zod';
import { ContextValue, Mode } from './Context';
export interface OnChangeArgs<Z extends z.ZodType> {
    /** The values in the form AFTER the change. */
    values: z.infer<Z>;
    /** The path that was changed. */
    path: string;
    /** The previous value at the path. */
    prev: unknown;
    /** Whether validation succeeded. */
    valid: boolean;
}
export interface UseArgs<Z extends z.ZodType> {
    values: z.infer<Z>;
    mode?: Mode;
    sync?: boolean;
    onChange?: (props: OnChangeArgs<Z>) => void;
    onHasTouched?: (value: boolean) => void;
    schema?: Z;
    scope?: string;
}
export interface UseReturn<Z extends z.ZodType> extends ContextValue<Z> {
}
export declare const use: <Z extends z.ZodType>({ values: initialValues, sync, schema, mode, onChange, onHasTouched, }: UseArgs<Z>) => UseReturn<Z>;
//# sourceMappingURL=use.d.ts.map