import type { CompositionProfile } from "./profile";

/**
 * BMW composition profile (ADR 013).
 *
 * Phase 0/1 placeholder. No real BMW system is wired here yet — the slots
 * exist, with values that document the intent. Real adapters are delivered in
 * Phase 9 (see plan §9.a–§9.h).
 *
 * Per ADR 010 / ADR 015, this file is the only sanctioned location to name
 * BMW-specific values. The forbidden-strings check allowlists this path.
 */
const profile: CompositionProfile = {
  name: "bmw",
  description: "BMW Supplier Development deployment. Phase 0/1 skeleton — real BMW adapters land in Phase 9.",
  productionReady: false,
  branding: {
    productName: "BMW Supplier Development",
    logoAssetKey: "bmw/logo",
    paletteKey: "custom",
    supportFooter: "BMW AG · Supplier Development",
  },
  features: {
    ownerConsole: true,
    strongAuth: true,
    demoSeeds: false,
    wertstrom: true,
    oee: true,
    lscWorkshop: true,
    // FB-36/FB-41 (P0 compliance): BMW opted out of new work_mode capture and
    // the Berater-Auslastung report. New assignments fall back to the
    // work_mode DB default ('onsite'); existing data + its display/export are
    // untouched pending a follow-up PR.
    workModeCapture: false,
    consultantLoadReport: false,
    // QVS-P7 (KAR-976, Kais-Go 2026-07-18): Flag-ON nach P6-Korpus-Validierung
    // (dev 91,2 %/validation 91,4 % parseOk, previewOk 100,0 % beide Splits,
    // 0 Mapper-Fehler — reports/qaf-value-stream-validation-results.md).
    // Rollback: docs/runbooks/qaf-value-stream-rollout.md.
    qafValueStream: true,
    qafSupplierBenchmark: true,
    // Demo-067 C (KAR-982, Top-Management-Demo-Programm): ON — Copilot-
    // Exporte (Fabrikanalyse/QAF-Vergleich/Wertstrom/Gesamtprojekt als
    // DOCX/XLSX) sind Teil des Demo-Pakets.
    copilotExports: true,
    // Wertstrom P2+P5 (KAR-878/KAR-986, Kais-Go 2026-07-22): Szenarien,
    // KPI-Delta-Vergleich, Abweichungs-Ansicht — ON. Der erste Rollout am
    // Morgen traf nur das default-Profil; die Produktions-Instanz läuft mit
    // diesem Profil (environment-variables.md: APP_PROFILE=bmw), daher hier
    // nachgezogen. Rollback: Flag zurück auf false, Daten bleiben intakt.
    wertstromScenarios: true,
    // Wertstrom P3–P7 + Excel-Roundtrip (KAR-878/KAR-986, Kais-Go
    // 2026-07-22): Wizard/Auto-Layout/Timeline v2/Panels/Tabellen-View/
    // Management-Analyse/Präsentationsmodus/Export-Familie/Excel-Import — ON
    // (gleicher Nachzug wie wertstromScenarios oben).
    wertstromUxV2: true,
    // Wertstrom P6 (KAR-878/KAR-986): SimVSM-Import-Adapter — Phasenplan-
    // Pflicht, off until this phase is rolled out, BMW included. See
    // lib/simvsm-import/README.md.
    wertstromSimvsmImport: false,
    experimental: {},
  },
  integrations: {
    // TODO(phase-9): switch `auth` to "custom" once lib/customers/bmw/adapters/identity-webeam ships.
    auth: "supabase",
    // TODO(phase-9): switch `observability` to "custom" once lib/customers/bmw/adapters/otel-dynatrace ships.
    observability: "console",
    // TODO(phase-9): switch `storage` to "custom" once the BMW object-store adapter ships.
    storage: "supabase-storage",
    queue: "none",
    // TODO(phase-9): switch `email` to "custom" once the BMW mail-gateway adapter ships.
    email: "resend",
    // TODO(phase-9): switch `support` to "custom" once the BMW ITSM adapter ships.
    support: "email-only",
    ai: "none",
    // TODO(phase-9): switch `datastore` to "custom" once the BMW read-only Postgres adapter + residency policy ship.
    datastore: "supabase",
  },
};

export default profile;
