import { OnInit } from "@angular/core";
import { AbstractControl, UntypedFormArray, UntypedFormGroup } from "@angular/forms";
import { TranslateService } from "@ngx-translate/core";
import { ValidationMessageService } from "../../core/validation-message.service";
import { ControlLabelPosition } from "../form-control-base";
import { PopoverContentPosition } from "../popover/popover.component";
import * as i0 from "@angular/core";
/** Function to iterate over form controls and
 *  ensure they contain unique values.  If any are duplicated all offending
 *  form controls will be marked as invalid
 *
 * @param valueProperty - the sub-property of the object represented by each form control
 *        it is dereferenced as formGroup.control.value[valueProperty].
 *        defaults to "value", which matches the form controls used to back comboboxes
 *        if explicitly null, this function assumes value is not a complex object and just extracts
 *        formGroup.control.value
 */
export declare const validateFormGroupValuesAreUnique: (fg: UntypedFormGroup | UntypedFormArray, valueProperty?: string | null, subProperty?: string) => void;
/**
 * Function to iterate over for controls and invoke the callback function when they are found.
 * Recursively calls itself when it encounters sub form groups and iterates over form arrays.
 * @param c
 * @param callback
 */
export declare const forEachFormControl: (c: AbstractControl, callback: (control: AbstractControl) => void) => void;
/**
 * Function to return the value if it is enabled and set
 * @param control
 */
export declare const getControlValue: (control: AbstractControl, valueProperty?: string | null, subProperty?: string) => any | null;
export declare class FormGroupComponent implements OnInit {
    protected validationMessageService: ValidationMessageService;
    private translateService;
    /**
     * Id
     */
    id?: string;
    /**
     * Bind id to host element
     */
    attrId?: string;
    /**
     * The form control label
     */
    label: string;
    /**
     * UI-oriented form model that retains the states and values of the HTML controls on screen.
     * Can be a {@link FormControl} or a {@link FormGroup}
     *
     * @type {FormGroup}
     * @memberof FormControlBase
     */
    formGroup?: UntypedFormGroup;
    /**
       * The position of the form control label (top|bottom|left)
       */
    labelPosition?: ControlLabelPosition;
    /**An optional string to show if any of the underlying controls has an error. If falsy, one of the
     * errors from the underlying controls will be used.
     */
    overrideValidationError?: string;
    /**An optional flag to hide the validation messages.
     */
    hideValidationMessage?: boolean;
    /**
     * Conditionally show a help popover next to the controls label.
     */
    helpPopover?: string;
    /**
    * When a help popover is present, allows the popover to be positioned in different locations.
    */
    helpPopoverPosition?: PopoverContentPosition;
    /**
     * All current validation errors
     *
     * @type {string}
     * @memberof FormControlBase
     */
    validationErrors: string;
    allControlsTouched: boolean;
    private componentDestroyed;
    constructor(validationMessageService: ValidationMessageService, translateService: TranslateService);
    ngOnInit(): Promise<void>;
    /**
     * Angular onDestroy lifecyle hook.
     * Unsubscribe from any observables
     *
     * @see https://angular.io/guide/lifecycle-hooks
     * @memberof FormControlBase
     */
    ngOnDestroy(): void;
    private getErrors;
    private assignErrors;
    /**
     * Function that subscribes to the formGroup's valueChanges Observable
     * to take any erros and translate them
     *
     * @param {*} [data]
     * @returns
     * @memberof FormControlBase
     */
    private translateValidationMessages;
    static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<FormGroupComponent, "ec-form-group", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "overrideValidationError": { "alias": "overrideValidationError"; "required": false; }; "hideValidationMessage": { "alias": "hideValidationMessage"; "required": false; }; "helpPopover": { "alias": "helpPopover"; "required": false; }; "helpPopoverPosition": { "alias": "helpPopoverPosition"; "required": false; }; }, {}, never, ["*"], false, never>;
}
