import { BehaviorSubject, Subject } from 'rxjs';
import type { FieldSetBuilder } from '../builders/set';
import { Maybe } from '../maybe';
import type { UnknownFieldSetBuilderChildren, UnknownFieldSetModelChildren } from '../utils';
import { IMaybeError, ValidateOption } from '../validate';
import { IModel } from './base';
import { BasicModel } from './basic';
import { INormalizeBeforeSubmit } from './field';
import { SET_ID } from './is';
declare type $FieldSetValue<Children extends UnknownFieldSetModelChildren> = {
    [Key in keyof Children]: Children[Key] extends IModel<infer V> ? V : never;
};
declare class FieldSetModel<Children extends UnknownFieldSetModelChildren = UnknownFieldSetModelChildren> extends BasicModel<$FieldSetValue<Children>> {
    [SET_ID]: boolean;
    protected readonly _displayName: string;
    patchedValue: Partial<$FieldSetValue<Children>> | null;
    readonly childRegister$: Subject<string>;
    readonly childRemove$: Subject<string>;
    readonly children: Children;
    owner: IModel<any> | null;
    readonly builder?: FieldSetBuilder<UnknownFieldSetBuilderChildren>;
    private _valid$?;
    private _value$?;
    private readonly invalidModels;
    private readonly mapModelToSubscriptions;
    normalizeBeforeSubmit: INormalizeBeforeSubmit<$FieldSetValue<Children>, any>;
    constructor(children: Children, id?: string);
    get value(): $FieldSetValue<Children>;
    get value$(): BehaviorSubject<$FieldSetValue<Children>>;
    get valid$(): BehaviorSubject<boolean>;
    _getValid$(shouldWarn?: boolean): BehaviorSubject<boolean>;
    _getValue$(shouldWarn?: boolean): BehaviorSubject<$FieldSetValue<Children>>;
    initialize(values: $FieldSetValue<Children>): void;
    getPatchedValue<T>(name: string): Maybe<T>;
    getRawValue(): $FieldSetValue<Children>;
    getSubmitValue(): any;
    registerChild(name: string, model: BasicModel<any>): void;
    removeChild<T extends keyof Children>(name: T): Children[T] | null;
    dispose(): void;
    patchValue(value: Partial<$FieldSetValue<Children>>): void;
    clear(): void;
    clearError(): void;
    reset(): void;
    validate(option?: ValidateOption): Promise<IMaybeError<any> | IMaybeError<any>[]>;
    pristine(): boolean;
    dirty(): boolean;
    touched(): boolean;
    get<Name extends keyof Children>(name: Name): Children[Name] | undefined | null;
    private _setValid;
    private _initValue$;
    private _initValid$;
    private _subscribeChild;
    private _unsubscribeChild;
    private _subscribeObservable;
}
export { FieldSetModel, $FieldSetValue };
