35 lines
823 B
TypeScript
35 lines
823 B
TypeScript
|
import { Component, OnInit, Inject } from '@angular/core';
|
||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||
|
|
||
|
export interface RelayMessageDialogData {
|
||
|
title: string;
|
||
|
message?: string;
|
||
|
}
|
||
|
|
||
|
export interface RelayMessageDialogResult {
|
||
|
choice: boolean;
|
||
|
}
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-layout-messenger-relay-message',
|
||
|
templateUrl: './relay-message.dialog.component.html',
|
||
|
styleUrls: ['./relay-message.dialog.component.scss']
|
||
|
})
|
||
|
export class RelayMessageDialogComponent implements OnInit {
|
||
|
constructor(
|
||
|
public dialogRef: MatDialogRef<
|
||
|
RelayMessageDialogData,
|
||
|
RelayMessageDialogResult
|
||
|
>,
|
||
|
@Inject(MAT_DIALOG_DATA) public data: RelayMessageDialogData
|
||
|
) {}
|
||
|
|
||
|
ngOnInit(): void {}
|
||
|
|
||
|
onClickChoice(choice: boolean): void {
|
||
|
this.dialogRef.close({
|
||
|
choice
|
||
|
});
|
||
|
}
|
||
|
}
|