import { Subject } from 'rxjs'; import { I18nService } from '@usitsdasdesign/dds-ng/shared/i18n'; import { ChangeDetectorRef, Component, StaticProvider, SimpleChanges } from '@angular/core'; import { Size, ErrorState } from '@usitsdasdesign/dds-ng/shared'; import { ResizeHandlerService } from '@usitsdasdesign/dds-ng/shared/resize-handler'; import { ControlValueAccessor, NgControl, FormGroupDirective, NgForm, FormControl } from '@angular/forms'; type Constructor = new (...args: any[]) => T; interface IDestroy { destroy: Subject; ngOnDestroy(): void; } type DestroyCtor = Constructor; declare function DestroyMixin>(Base?: T): DestroyCtor & T; interface II18n extends IDestroy { i18n: I18nService; ngOnInit(): void; } type I18nCtor = Constructor; declare function I18nMixin>(Base?: T): I18nCtor & T; interface IResponsiveness extends IDestroy { size: Size | string | undefined; isResponsive: boolean | undefined; smallDevice: boolean; _size: Size | string; resizeService: ResizeHandlerService; cdr: ChangeDetectorRef; ngOnInit(): void; } type ResponsivenessCtor = Constructor; declare function ResponsivenessMixin>(Base?: T): ResponsivenessCtor & T; interface IFormAccessor extends ControlValueAccessor { writeValue(value: any): void; onModelTouched: () => void; onModelChange: (_: unknown) => void; setDisabledState(_: boolean): void; } type FormAccessorCtor = Constructor; declare function FormAccessorMixin>(Base?: T): FormAccessorCtor & T; declare function valueAccessor(components: Component): StaticProvider; interface IErrorState { errorState: string | ErrorState | undefined; ngControl: NgControl; parentFormGroup: FormGroupDirective; parentForm: NgForm; isError: boolean | undefined; isError$: Subject; _isError: boolean; _isFormControlRequired: boolean; cdr: ChangeDetectorRef; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngDoCheck(): void; writeValue(value: any): void; checkError(): void; updateFormErrorState(errorState: string | ErrorState): void; isErrorStateDefault(control: FormControl | null): boolean; isErrorStateOnFocus(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean; } type ErrorStateCtor = Constructor; declare function ErrorStateMixin>(Base?: T): ErrorStateCtor & T; export { DestroyMixin, ErrorStateMixin, FormAccessorMixin, I18nMixin, ResponsivenessMixin, valueAccessor }; export type { Constructor, DestroyCtor, ErrorStateCtor, FormAccessorCtor, I18nCtor, IDestroy, IErrorState, IFormAccessor, II18n, IResponsiveness, ResponsivenessCtor };