import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core';
import { AbstractControl, ControlValueAccessor, NgControl, Validator } from '@angular/forms';
import { TranslocoScope } from '@jsverse/transloco';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
export declare class NggvBaseControlValueAccessorComponent implements AfterViewInit, OnInit, OnDestroy, ControlValueAccessor, Validator {
ngControl: NgControl;
protected translocoScope: TranslocoScope;
protected cdr: ChangeDetectorRef;
/** Custom template for displaying the content of the label.
* Specified by nesting an `Custom Label`.
*/
labelContentTpl?: TemplateRef;
/** Custom template for displaying value when the input is locked.
* Specified by nesting an `Custom locked content state: {{ state }}`.
*/
lockedTpl?: TemplateRef;
/** Reference to the native child input element. */
inputRef?: ElementRef;
/** Id of the host element and is accessible by the children, automatically generated if not provided. */
id: any;
/** Name of the child input element. */
name?: string;
/**
* Label of the child input element using the default template.
* Can be overwritten by specifying an `Custom Label`.
*/
label?: string;
/** Role of the child input element. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles */
role?: string;
/** Value of the child input element. Mostly used in conjunction with radio and checkboxes. */
value: any;
/** An error string to be shown under invalid inputs. Overwrites any form errors. */
error?: string;
/** @deprecated Only one error should be shown under each field. */
errorList?: string[];
/** @deprecated Icon is always added before error. */
withErrorIcon?: boolean;
/** Description of the child input element. Both visibly and as `aria-label`. */
description?: string;
/** Determines if the label used to display the "description" text will be rendered to DOM */
descriptionIsVisible: boolean;
/** If set to true, the browser will try to automatically set focus to the child input element. */
autofocus: boolean;
/** Deafult value of the child input element. Used when resetting child element. */
defaultValue?: any;
/** If passed, the component will listen for updates and will reset its value. */
reset?: Observable;
/** Adds (Optional) to input label. */
optional?: boolean | null | undefined;
private _locked;
/** Hides the input borders and displays current value as a text. */
set locked(value: boolean | null | undefined);
get locked(): boolean | null | undefined;
/** If set to true, using a controls disabled state will display input as locked. */
displayDisabledAsLocked?: boolean | null | undefined;
private _required;
/** Override the required flag of the component. */
set required(value: boolean | null | undefined);
/** Child input element is considered required and changes default label template accordingly. */
get required(): boolean | null | undefined;
private _invalid;
/** Override the invalid state of the component. */
set invalid(value: boolean);
/** The component has the invalid state, usually decorating the elements red and shows the first error. */
get invalid(): boolean;
private _valid;
/** Override the valid state of the component. */
set valid(value: boolean);
/** The component has the valid state, usually decorating the elements green. */
get valid(): boolean;
/** The component has the focused state, updated by the child input element's focus state. */
focused: boolean;
private _disabled;
/** Override the disabled state of the component. */
set disabled(value: boolean);
/** The component has the disabled state, usually muting the colors and removes interaction. */
get disabled(): boolean;
/** Emits focus events triggered by the child elements. */
readonly nggvFocus: EventEmitter;
/** Emits focus events triggered by the child elements. */
readonly nggvBlur: EventEmitter;
private _state;
/** @internal */
protected onChange: (_: any) => void;
/** @internal */
protected onTouched: () => void;
/** @internal */
protected onValidatorChange: () => void;
scope: string | undefined;
private _onDestroy$;
/**
* Creates a new BaseControlValueAccessorComponent.
* @param ngControl optional FormControl provided when component is used in a form, through dependency injection.
* @param translocoScope optional TranslocoScope provided if component is used within a scope.
*/
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef);
ngOnInit(): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
detectChanges(): void;
/** @internal */
onFocus(event: Event): void;
/** @internal */
onBlur(event: Event): void;
/** Sets the focus on the actual input element. */
setFocus(): void;
/** Internal state/value that the native input element has. */
get state(): any;
/** Internal state/value that the native input element has. */
set state(value: any);
/** Writes a new value to the child input element. */
writeValue(value: any): void;
/** Registers a callback function that is called when the child input element's value changes. */
registerOnChange(fn: (_: any) => object): void;
/** Registers a callback function that is called when the child input element triggers on blur. */
registerOnTouched(fn: () => void): void;
/** Function that is called by the forms API when the control status changes to or from 'DISABLED'. */
setDisabledState(isDisabled: boolean): void;
/** Method that performs synchronous validation against the provided control. Used for internal validation. */
validate(_control: AbstractControl): {
[name: string]: any;
} | null;
/** Registers a callback function to call when the validator inputs change. */
registerOnValidatorChange(fn: () => void): void;
/** Returns the first entry in an error object. */
get firstError(): {
code: string;
params: any;
} | null;
static ɵfac: i0.ɵɵFactoryDeclaration;
static ɵcmp: i0.ɵɵComponentDeclaration;
static ɵprov: i0.ɵɵInjectableDeclaration;
}