import { InjectionToken, Signal } from '@angular/core';

/**
 * A shared seam for the chrome to show "who is logged in" + log out, WITHOUT
 * shared/ depending on the auth context (the import-direction rule forbids that).
 * Auth provides this token at the app root (see app.config.ts); the shared header
 * injects it. SessionStore satisfies this shape structurally.
 */
export interface SessionPort {
  readonly session: Signal<{ naam: string } | null>;
  logout(): void;
}

export const SESSION_PORT = new InjectionToken<SessionPort>('SESSION_PORT');
