import { AbstractControl, ControlValueAccessor, FormControl, NgControl, ValidatorFn } from '@angular/forms';
import { TranslationService } from '@vcd/i18n';
import { CanBeReadOnly } from './interfaces/can-be-read-only.interface';
import * as i0 from "@angular/core";
/**
 * 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 subclasses.
 *
 * V is the type of the control's value
 */
export declare class BaseFormControl<V> implements ControlValueAccessor, CanBeReadOnly {
    protected translationService: TranslationService;
    /**
     * 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, translationService: TranslationService);
    /**
     * The FormControl associated with the FormControlName directive
     *
     * If one was not associated using [formControl] or [formControlName], we'll create one to keep things working.
     * This is so that components can still be used without a form control
     */
    get formControl(): FormControl<V>;
    get showErrors(): boolean;
    /**
     * Errors from the form control validation
     */
    get errorKeys(): string[];
    /**
     * Return the translated error strings.
     */
    get translatedErrors(): string[];
    registerOnChange(onChange: (...args: unknown[]) => unknown): void;
    registerOnTouched(onTouched: (...args: unknown[]) => unknown): void;
    setDisabledState(isDisabled: boolean): void;
    writeValue(val: unknown): void;
    /**
     * When errorObjectValue param is not an array we pass back the control's value to stay backward compatible.
     */
    private getTranslationParams;
    static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormControl<any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormControl<any>, never, never, { "showAsterisk": "showAsterisk"; "label": "label"; "description": "description"; "isReadOnly": "isReadOnly"; "errorLabels": "errorLabels"; "isResponsive": "isResponsive"; }, {}, never, never, false, never>;
}
