diff --git a/src/app/components/ai-chat/ai-chat.component.ts b/src/app/components/ai-chat/ai-chat.component.ts index 8b1378917..bd4bc834f 100644 --- a/src/app/components/ai-chat/ai-chat.component.ts +++ b/src/app/components/ai-chat/ai-chat.component.ts @@ -1 +1,35 @@ +import {ChangeDetectionStrategy, Component, inject} from '@angular/core'; +import {MatButtonModule} from '@angular/material/button'; +import {MatDialog, MatDialogModule} from '@angular/material/dialog'; + +/** + * @title Dialog with header, scrollable content and actions + */ +@Component({ + selector: 'dialog-content-example', + templateUrl: 'dialog-content-example.html', + standalone: true, + imports: [MatButtonModule, MatDialogModule], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DialogContentExample { + readonly dialog = inject(MatDialog); + + openDialog() { + const dialogRef = this.dialog.open(DialogContentExampleDialog); + + dialogRef.afterClosed().subscribe(result => { + console.log(`Dialog result: ${result}`); + }); + } +} + +@Component({ + selector: 'dialog-content-example-dialog', + templateUrl: 'dialog-content-example-dialog.html', + standalone: true, + imports: [MatDialogModule, MatButtonModule], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DialogContentExampleDialog {}