import { FormGroupDirective, NgControl, NgForm } from '@angular/forms'; import { Subject } from 'rxjs'; import { ErrorStateMatcher } from '../error/error-state-matcher'; import { AbstractConstructor, Constructor } from './constructor'; /** @docs-private */ export interface CanUpdateErrorState { /** Whether the component is in an error state. */ errorState: boolean; /** An object used to control the error state of the component. */ errorStateMatcher: ErrorStateMatcher; /** Updates the error state based on the provided error state matcher. */ updateErrorState(): void; } /** @docs-private */ export type CanUpdateErrorStateCtor = Constructor; /** @docs-private */ export interface HasErrorState { parentFormGroup: FormGroupDirective | null; parentForm: NgForm | null; defaultErrorStateMatcher: ErrorStateMatcher; ngControl: NgControl | null; stateChanges: Subject; } /** * Mixin to augment a directive with updateErrorState method. * For component with `errorState` and need to update `errorState`. */ export declare function mixinErrorState>(base: T): CanUpdateErrorStateCtor & T; /** * Class that tracks the error state of a component. * @docs-private */ export declare class KbqErrorStateTracker implements CanUpdateErrorState { private defaultMatcher; ngControl: NgControl | null; private parentFormGroup; private parentForm; private stateChanges; /** Whether the tracker is currently in an error state. */ errorState: boolean; /** User-defined matcher for the error state. */ errorStateMatcher: ErrorStateMatcher; constructor(defaultMatcher: ErrorStateMatcher | null, ngControl: NgControl | null, parentFormGroup: FormGroupDirective | null, parentForm: NgForm | null, stateChanges: Subject); /** Updates the error state based on the provided error state matcher. */ updateErrorState(): void; }