/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { AbstractControl, ControlValueAccessor, FormControl, NgControl, ValidatorFn } from '@angular/forms';
import { CanBeReadOnly } from './interfaces/can-be-read-only.interface';
/**
 * For a given control, apply the given validator and override its setValidators method so that this default validator will always
 * be applied
 * @param control - Control to receive a default validator
 * @param defaultValidator - Validator that will always be present for the form control
 */
export declare function defaultValidatorForControl(control: AbstractControl, defaultValidator: ValidatorFn): void;
/**
 * Wrapper to enforce UX decisions like readonly-ness, label position and error displaying. And also to make
 * the form control backing a form control name directive available to sub classes.
 */
export declare class BaseFormControl implements ControlValueAccessor, CanBeReadOnly {
    /**
     * Auto generated ID for the input field.
     */
    readonly id: string;
    /**
     * Auto generated ID for the description field.
     */
    readonly descriptionId: string;
    /**
     * Auto generated ID for the error field.
     */
    readonly errorsId: string;
    /**
     * Change callback.
     */
    onChange: (...args: unknown[]) => unknown;
    /**
     * Touch callback.
     */
    onTouch: (...args: unknown[]) => unknown;
    /**
     * Whether the control is disabled.
     */
    disabled: boolean;
    /**
     * Show the asterisk next to the control when true
     */
    showAsterisk: boolean;
    /**
     * The label that appears before the control
     */
    label: string;
    /**
     * The description that appears below the control
     * \u00A0 is &nbsp; (non-breaking space)
     */
    description: string;
    /**
     * Whether this component is in readonly mode
     */
    isReadOnly: boolean;
    /**
     * Error labels to be used instead of NgControl error keys
     */
    errorLabels: string[];
    /**
     * If this is true, Clarity responsive classes will be added to the component's elements so that label and input
     * elements are on separate lines when on small screens or inside small containers.
     *
     * Note that if a form control is being used inside a `.clr-form-vertical`, the controls should all have
     * isResponsive set to false, since that will cause labels to always display on a separate line and adding
     * the responsive styles would interfere with that
     */
    isResponsive: boolean;
    /**
     * FormControlName directive
     */
    formControlNameDirective: NgControl;
    /**
     * To store the initial value of the input form control.
     */
    protected initialValue: number | string | boolean;
    constructor(ngControl: NgControl);
    /**
     * The FormControl associated with the FormControlName directive
     */
    get formControl(): FormControl;
    get showErrors(): boolean;
    /**
     * Errors from the form control validation
     */
    get errorKeys(): string[];
    registerOnChange(onChange: (...args: unknown[]) => unknown): void;
    registerOnTouched(onTouched: (...args: unknown[]) => unknown): void;
    setDisabledState(isDisabled: boolean): void;
    writeValue(val: any): void;
}
