import { Component } from '@angular/core'; import { Observable } from 'rxjs'; import { NotificationService } from '../../services/notification.service'; import { CommonModule } from '@angular/common'; @Component({ selector: 'app-notifications', imports: [CommonModule], templateUrl: './notifications.component.html', styleUrl: './notifications.component.scss' }) export class NotificationsComponent { notifications$: Observable<{ type: string; message: string; } | null> constructor(private notificationService: NotificationService) { this.notifications$ = this.notificationService.notifications$; } clearNotification() { this.notificationService.clearNotification(); } }