Some checks failed
Build and Deploy Java Gradle Application / build-and-deploy (push) Failing after 53s
36 lines
875 B
TypeScript
36 lines
875 B
TypeScript
import {Component, inject} from "@angular/core";
|
|
import {MatRippleModule} from "@angular/material/core";
|
|
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
|
|
|
|
export interface ConfirmationDialogData {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
@Component({
|
|
selector: 'app-confirmation-dialog',
|
|
templateUrl: './confirmation-dialog.component.html',
|
|
styleUrl: './confirmation-dialog.component.scss',
|
|
imports: [MatRippleModule]
|
|
})
|
|
export class ConfirmationDialog {
|
|
private readonly dialogRef = inject(MatDialogRef<ConfirmationDialog>);
|
|
data: ConfirmationDialogData = inject(MAT_DIALOG_DATA);
|
|
|
|
get title(): string {
|
|
return this.data.title;
|
|
}
|
|
|
|
get description(): string {
|
|
return this.data.description;
|
|
}
|
|
|
|
closeAndValidate(): void {
|
|
this.dialogRef.close(true);
|
|
}
|
|
|
|
closeDialog(): void {
|
|
this.dialogRef.close(false);
|
|
}
|
|
}
|