import { Input , OnInit , } from "@angular/core" ; import { ControlValueAccessor } from "@angular/forms" ; import { Utils } from "shared-library/core/services" ; export class CheckDisplayName implements OnInit , ControlValueAccessor { @ Input ( ) placeholder ; @ Input ( ) hint ; @ Input ( ) isProfilePage ; myValue : any = null ; @ Input ( ) disabled : boolean ; propagateChange = ( _ ) => { } ; constructor ( public utils ) { } ngOnInit ( ) { this . disabled = this . isProfilePage ? true : false ; } writeValue ( obj ) { this . myValue = obj ; } onTextChange ( event ) { this . propagateChange ( event ) ; } registerOnChange ( fn ) { this . propagateChange = fn ; } registerOnTouched ( fn ) { } setDisabledState ( isDisabled ) { this . disabled = isDisabled ; } }