import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterLink } from '@angular/router';
import { AdminNotificationsFacade } from '../facade/admin-notifications.facade';
import { LanguageService } from '../../../../services/language.service';
import { BadgeComponent } from '../../../../shared/ui/badge/badge.component';
import { ButtonComponent } from '../../../../shared/ui/button/button.component';
import { EmptyStateComponent } from '../../../../shared/ui/empty-state/empty-state.component';

@Component({
  selector: 'app-admin-notifications-page',
  standalone: true,
  imports: [CommonModule, FormsModule, RouterLink, BadgeComponent, ButtonComponent, EmptyStateComponent],
  templateUrl: './admin-notifications-page.component.html',
  styleUrls: ['./admin-notifications-page.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class AdminNotificationsPageComponent {
  readonly facade = inject(AdminNotificationsFacade);
  private readonly languageService = inject(LanguageService);
  readonly currentLang = this.languageService.currentLanguage;

  readonly eventTypes = ['all', 'order.created', 'order.paid'] as const;

  constructor() {
    this.facade.load();
  }
}
