/** Angular Imports */ import { Component , Output , EventEmitter , Input } from '@angular/core' ; /**
 * Client Preview Step Component
 */ @ Component ( { selector : 'mifosx-client-preview-step' , templateUrl : './client-preview-step.component.html' , styleUrls : [ './client-preview-step.component.scss' ] } ) export class ClientPreviewStepComponent { /** Client Address field configuration */ @ Input ( ) clientAddressFieldConfig : any ; /** Client Template */ @ Input ( ) clientTemplate : any ; /** Client Object */ @ Input ( ) client : any ; /** Form submission event */ @ Output ( ) submit = new EventEmitter ( ) ; constructor ( ) { } param { any } fieldName param { any } fieldId getSelectedValue ( fieldName , fieldId ) { return ( this . clientTemplate . address [ 0 ] [ fieldName ] . find ( ( fieldObj ) => fieldObj . id === fieldId ) ) ; } param { any } fieldName isFieldEnabled ( fieldName ) { return ( this . clientAddressFieldConfig . find ( ( fieldObj ) => fieldObj . field === fieldName ) ) ?. isEnabled ; } }