/** Angular Imports */ import { Component , OnInit , Inject } from '@angular/core' ; import { MAT_DIALOG_DATA , MatDialogRef } from '@angular/material/dialog' ; import { FormGroup , FormBuilder , Validators } from '@angular/forms' ; /**
 * Report Parameter Dialog Component.
 */ @ Component ( { selector : 'mifosx-add-report-parameter-dialog' , templateUrl : './report-parameter-dialog.component.html' , styleUrls : [ './report-parameter-dialog.component.scss' ] } ) export class ReportParameterDialogComponent implements OnInit { /** Report Parameter Form. */ reportParameterForm : FormGroup ; param { MatDialogRef } dialogRef param { FormBuilder } formBuilder param { any } data constructor ( public dialogRef , public formBuilder , @ Inject ( MAT_DIALOG_DATA ) public data ) { } /**
     * Creates the add report parameter form.
     */ ngOnInit ( ) { this . reportParameterForm = this . formBuilder . group ( { 'parameterName' : [ this . data . parameterName , Validators . required ] , 'reportParameterName' : [ this . data . reportParameterName ] } ) ; } /**
     * Closes the dialog and returns value of the form.
     */ submit ( ) { this . dialogRef . close ( this . reportParameterForm . value ) ; } }