import type { Signal } from '@angular/core';

/**
 * Port: surfaces the current authenticated account for the shell (sidebar user menu).
 *
 * The concrete adapter is IAM-coupled — it runs the `iamMeAccount` query, which belongs to the
 * IAM bounded context — and therefore lives in APP code, wired via DI in `aurora.provider.ts`.
 * The framework owns only this contract, so shell consumers depend on the abstraction rather than
 * on IAM data-access, keeping `@aurora` free of an `@aurora → app` dependency. Mirrors the
 * `AuthenticationService` port + adapter pattern.
 */
export abstract class CurrentAccountService {
  /** Display name (name + surname, or username), blank until `load()` resolves. */
  abstract readonly displayName: Signal<string>;
  /** Account email, blank until `load()` resolves. */
  abstract readonly email: Signal<string>;
  /** Best-effort load of the current account; failures leave the signals blank. */
  abstract load(): void;
}
