import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { UserNotificationService } from '../../services/user-notification.service';
import { TranslatePipe } from '../../../../../i18n/translate.pipe';

@Component({
  selector: 'app-floating-notifications',
  standalone: true,
  imports: [TranslatePipe],
  templateUrl: './floating-notifications.component.html',
  styleUrls: ['./floating-notifications.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class FloatingNotificationsComponent {
  private readonly notificationsService = inject(UserNotificationService);

  readonly notifications = this.notificationsService.notifications;

  dismiss(id: string): void {
    this.notificationsService.dismiss(id);
  }
}
