import * as _$react from "react";

//#region src/hooks/useFields.d.ts
type ValidatorFn = (value: string, fields?: Fields<any>) => string | false;
type Validators = {
  [key: string]: (msg?: string, ...args: unknown[]) => ValidatorFn;
};
type FieldValue = string;
type FieldValueArg = FieldValue | [FieldValue, boolean | ValidatorFn[]];
type FieldArgs<V extends FieldValueArg> = Record<string, V>;
type Fields<T> = Record<keyof T, FieldValue>;
declare const v: Validators;
declare function useFields<V extends FieldValueArg, T extends FieldArgs<V>>(defaultFieldsFn: () => T, deps?: unknown[]): {
  blurredFields: { [P in keyof T]: boolean };
  getUpdateField: (fieldName: keyof T) => (newValue: string) => void;
  allFieldsValid: boolean;
  fieldErrors: { [P_1 in keyof T]: undefined };
  fields: Fields<T>;
  mergeWithFields: (updatedFields: Partial<T>) => void;
  checkFieldForError: (fieldName: string, fieldValue: string) => string | null;
  setFieldBlurred: (fieldName: keyof T) => void;
  getSetFieldBlurred: (fieldName: keyof T) => () => void;
  setFieldErrors: _$react.Dispatch<_$react.SetStateAction<{ [P_1 in keyof T]: undefined }>>;
};
//#endregion
export { FieldArgs, FieldValueArg, ValidatorFn, useFields as default, v };