import type { Atom } from "../atom/definition.ts";
import { AtomImpl } from "../atom/implementation.ts";
import { EnsoUtils as Utils } from "../utils.ts";
import { Field } from "./definition.ts";
export { FieldImpl as Field, FieldProxyImpl as FieldProxy };
export declare class FieldImpl<Value> extends AtomImpl<Value> {
    #private;
    static prop: string;
    static create<Value>(value: Value, parent?: Atom.Parent.Bare.Ref<"field", any, any>): FieldImpl<Value>;
    static proxy(field: any, intoMapper: any, fromMapper: any): FieldProxyImpl<unknown>;
    static optional(target: Atom.BareOptionalTarget<"field", FieldImpl<unknown>>): FieldOptionalImpl<unknown>;
    static Component<Value>(props: Field.Component.Props<Value>): import("react").ReactNode;
    static normalizeError(error: Field.Error.Type): Field.Error;
    static errorChangesFor(wasValid: boolean): bigint;
    constructor(value: Value, parent?: Atom.Parent.Bare.Ref<"field", any, any>);
    get dirty(): boolean;
    useDirty<Enable extends boolean | undefined = undefined>(enable?: Enable): Atom.Hooks.Result<Enable, boolean>;
    get initial(): Value;
    commit(): void;
    reset(): void;
    useMeta<Props extends Field.Meta.Props | undefined = undefined>(props?: Props): {
        valid: boolean | undefined;
        errors: Field.Error[] | undefined;
        dirty: boolean | undefined;
    };
    control(props: any): {
        name: any;
        ref: <Element extends HTMLElement>(element: Element | null) => void;
        onBlur: <Element extends HTMLElement>(event: React.FocusEvent<Element>) => void;
    };
    ref<Element extends HTMLElement>(element: Element | null): void;
    get errors(): any;
    useErrors<Enable extends boolean | undefined = undefined>(enable?: Enable): Atom.Hooks.Result<Enable, Field.Error[]>;
    addError(error: any): void;
    clearErrors(): void;
    get validationTree(): any;
    get valid(): boolean;
    useValid<Enable extends boolean | undefined = undefined>(enable?: Enable): Atom.Hooks.Result<Enable, boolean>;
    validate(validator: any): Promise<void>;
    clearCache(): void;
}
export declare class FieldProxyImpl<Value> extends FieldImpl<Value> {
    #private;
    constructor(source: FieldImpl<unknown>, into: any, from: any);
    deconstruct(): void;
    connect(source: FieldImpl<unknown>): void;
}
export declare class FieldOptionalImpl<Value> extends FieldImpl<Value> {
    #private;
    constructor(target: Atom.BareOptionalTarget<"field", FieldImpl<unknown>>);
    get value(): Value;
    at<Key extends keyof Utils.NonNullish<Value>>(key: Key): any;
    get try(): Atom.BareTry<AtomImpl<Value[keyof Value]>, keyof Value> | undefined | null;
    addError(error: Field.Error | string): void;
}
//# sourceMappingURL=implementation.d.ts.map