/**
 * Per-environment configuration for `portal-admin`, per ADR-0018.
 *
 * Holds the dev defaults; per-environment siblings
 * (`environment.staging.ts`, `environment.prod.ts`) land alongside
 * once those targets exist, and `project.json` declares a
 * `fileReplacements` entry to swap at build time.
 *
 * Shape mirrors `apps/portal-shell/src/environments/environment.ts`
 * intentionally: any change here that affects the consumer contract
 * with `feature-auth` must be made in both files (same env vars on
 * the lib side, same BFF base URL pattern).
 */
export const environment = {
  /**
   * Origin + prefix of the BFF HTTP API. Same value as portal-shell
   * — both SPAs talk to the same BFF (per ADR-0020 §"Where does
   * the admin app live"). The admin-specific routing happens via
   * the `AUTH_PATH_PREFIX` token (`/admin/auth`) provided in
   * `app.config.ts`, not by talking to a different host.
   */
  bffApiBaseUrl: 'http://localhost:3000/api',

  /**
   * Name of the BFF's CSRF cookie. v1 reuses `portal_csrf`
   * (shared between surfaces; see PR #129's notes on
   * `__Host-portal_csrf` / `portal_csrf`). A future hardening
   * could split this into `portal_admin_csrf` when both portals
   * are open simultaneously becomes a regular pattern.
   */
  bffCsrfCookieName: 'portal_csrf',

  /**
   * OTLP/HTTP traces endpoint — same OTel collector as portal-shell.
   */
  otlpEndpoint: 'http://localhost:4318/v1/traces',

  /**
   * Origin of the sibling `portal-shell` SPA — drives the "Open
   * Portal Shell" entry in the admin user menu. Symmetric with
   * `portal-shell`'s `adminAppUrl`; per ADR-0020 the two SPAs live
   * on distinct origins, so this is a raw cross-origin `<a href>`,
   * not an Angular route.
   */
  shellAppUrl: 'http://localhost:4200',

  /**
   * Base origin of the Jaeger UI — the trace-explorer the admin
   * audit-log viewer links each `trace_id` to. Dev points at the
   * compose-managed Jaeger from the `observability` profile (see
   * `infra/local/dev.compose.yml`). Prod will switch to whatever
   * trace backend the future infrastructure ADR picks (Tempo,
   * Grafana Cloud, on-prem Jaeger…) via the per-env file replacement.
   *
   * Trace URLs are built as `${jaegerBaseUrl}/trace/<id>`.
   */
  jaegerBaseUrl: 'http://localhost:16686',
};
