import { Component, Inject, OnInit } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; @Component({ selector: 'app-add-account-dialog-component', templateUrl: 'add-account-dialog.component.html', styleUrls: ['./add-account-dialog.component.scss'], }) export class AddAccountDialogComponent implements OnInit { //TODO: refactor datasetProfileDefinitionModel: any; datasetProfileDefinitionFormGroup: UntypedFormGroup; progressIndication = false; public hasEmail = true; //TODO: refactor private request: any; constructor( public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any ) { } ngOnInit(): void { //TODO refactor // this.mergeLoginService.getObservable().subscribe(result => { // if (result !== undefined) { // if (!(result.email !== undefined && result.email !== null)) { // this.request = result; // this.hasEmail = false; // } else { // this.dialogRef.close(result); // } // } // }); } add(): void { this.request.email = 'email'; this.dialogRef.close(this.request); } cancel(): void { this.dialogRef.close(); } closeDialog(): void { this.dialogRef.close(); } }