import { type ValidationMap, type Validator } from '@cantinc/utils'; import { type Ref } from '@innet/dom'; import { Context } from '@innet/jsx'; import { type State } from 'watch-state'; import { type FormProps } from '../../../ui'; export interface FormField { name: string; state: State; error: State; element: Ref; defaultValue?: V; removed?: boolean; validation?: Validator[]; } export interface FormContext extends FormProps { fields: Set>; destroyed: boolean; loading: State; ref: Ref; responseData?: any; submitData?: any; validation: ValidationMap; touched: Record; } export declare const formContext: Context; export declare function useForm(): FormContext;