import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { AuthService } from 'feature-auth';

/**
 * Admin-portal profile page. Lazy-loaded at `/profile`, gated by
 * `authGuard` so `AuthService.currentUser()` is guaranteed non-null
 * by the time the template runs.
 *
 * Carries more identity surface than the `portal-shell` counterpart
 * because the admin-side `/api/admin/auth/me` includes the `roles`
 * claim (admin SPA renders role badges, drives admin-only UI). The
 * user-portal page deliberately skips `roles` to stay aligned with
 * ADR-0009 §"curated public view" — see `CurrentUser` for the field
 * shape.
 */
@Component({
  selector: 'app-profile-page',
  templateUrl: './profile.html',
  styleUrl: './profile.scss',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ProfilePage {
  private readonly auth = inject(AuthService);
  protected readonly user = this.auth.currentUser;
}
