import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ActivatedRoute, RouterLink } from '@angular/router';
import { TranslatePipe } from '../../../i18n/translate.pipe';

/** Landing page for backoffice sections not built yet (categories, static pages, transactions, orders, media). Route `data.titleKey` sets the section name; falls back to the generic "coming soon" title. */
@Component({
  selector: 'app-backoffice-coming-soon-page',
  standalone: true,
  imports: [CommonModule, RouterLink, TranslatePipe],
  templateUrl: './backoffice-coming-soon-page.component.html',
  styleUrls: ['./backoffice-coming-soon-page.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BackofficeComingSoonPageComponent {
  private readonly route = inject(ActivatedRoute);

  readonly titleKey: string = this.route.snapshot.data['titleKey'] ?? 'dashboard.comingSoonTitle';
}
