import { UntypedFormArray } from '@angular/forms';
import { AbstractControl, AsyncValidator, ControlEventOptions, ControlOptions, ControlPath, ControlState, EmitEvent, ExtractStrings, OnlySelf, Validator } from './types';
import { Observable, Subscription } from 'rxjs';
import { FormArrayOptions, FormDefinition, FormType } from './model';
export declare class RxapFormArray<T = any, E extends object = any, Parent extends object = any> extends UntypedFormArray implements AbstractControl<T[]> {
    controls: Array<AbstractControl<T>>;
    private _readonly;
    get readonly(): boolean;
    set readonly(value: boolean);
    /**
     * @internal
     */
    get rxapFormDefinition(): (FormType<Parent> & FormDefinition<Parent>) | undefined;
    get controlPath(): string;
    readonly value: T[];
    get fullControlPath(): string;
    readonly valueChanges: Observable<T[]>;
    readonly value$: Observable<T[]>;
    readonly status: ControlState;
    readonly disabled$: Observable<boolean>;
    readonly statusChanges: Observable<ControlState>;
    readonly enabled$: Observable<boolean>;
    readonly errors: E | null;
    readonly status$: Observable<ControlState>;
    readonly errors$: Observable<E | null>;
    readonly controlId: string;
    private readonly touchChanges;
    readonly touch$: Observable<boolean>;
    private readonly dirtyChanges;
    readonly dirty$: Observable<boolean>;
    private readonly _builder;
    private readonly _controlInsertedFn;
    private readonly _controlRemovedFn;
    constructor(controls: Array<AbstractControl<T>>, options: FormArrayOptions);
    select<R>(mapFn: (state: T[]) => R): Observable<R>;
    at(index: number): AbstractControl<T>;
    getRawValue(): T[];
    insert(index: number, control: AbstractControl<T>): void;
    /**
     * inserts a new control at the specified index. If the index is undefined
     * the new control will be added to the end.
     *
     * @param index (optional) the index where the control should be created
     * @param state (optional) the initial state of the new control
     * @param options (optional) ControlEventOptions
     */
    insertAt(index?: number, state?: T, options?: ControlEventOptions): void;
    disabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
    enabledWhile(observable: Observable<boolean>, options?: ControlOptions): Subscription;
    mergeValidators(validators: Validator): void;
    mergeAsyncValidators(validators: AsyncValidator): void;
    markAllAsDirty(): void;
    markAllAsPristine(): void;
    setValue(valueOrObservable: T[] | Observable<T[]>, options?: ControlEventOptions): Subscription | void;
    markAllAsUntouched(): void;
    validateOn(observableValidation: Observable<null | object>): Subscription;
    hasErrorAndTouched(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
    private _patchValue;
    patchValue(valueOrObservable: any, options?: ControlEventOptions): Subscription | void;
    hasErrorAndDirty(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
    removeAt(index: number): void;
    setEnable(enable?: boolean, opts?: ControlEventOptions): void;
    push(control: AbstractControl<T>, options?: ControlEventOptions): void;
    setDisable(disable?: boolean, opts?: ControlEventOptions): void;
    setControl(index: number, control: AbstractControl<T>, options?: ControlEventOptions): void;
    markAsTouched(opts?: OnlySelf): void;
    markAsUntouched(opts?: OnlySelf): void;
    markAsPristine(opts?: OnlySelf): void;
    markAsDirty(opts?: OnlySelf): void;
    reset(value?: T[], options?: ControlEventOptions): void;
    setValidators(newValidator: Validator, updateValueAndValidity?: boolean): void;
    setAsyncValidators(newValidator: AsyncValidator, updateValueAndValidity?: boolean): void;
    hasError(errorCode: ExtractStrings<E>, path?: ControlPath): boolean;
    setErrors(errors: Partial<E> | null, opts?: EmitEvent): void;
    getError<K extends ExtractStrings<E>>(errorCode: K, path?: ControlPath): E[K] | null;
}
