import type { EventTheme } from "@/types/event";

/**
 * FR-SIG-004: maps a Signature Event's chosen accent color to Tailwind
 * classes — always one of the 5 official BVG colors (§9.4.5), never an
 * arbitrary value, since the lookup only has these 5 keys.
 */
const ACCENT_CLASSES: Record<EventTheme["accent_color"], { bg: string; text: string; bgSoft: string }> = {
  primary: { bg: "bg-kolabora-primary", text: "text-kolabora-primary", bgSoft: "bg-kolabora-primary/15" },
  secondary: { bg: "bg-kolabora-secondary", text: "text-kolabora-secondary", bgSoft: "bg-kolabora-secondary/40" },
  tertiary: { bg: "bg-kolabora-tertiary", text: "text-kolabora-tertiary", bgSoft: "bg-kolabora-tertiary/15" },
  neutral_dark: {
    bg: "bg-kolabora-neutral-dark",
    text: "text-kolabora-neutral-dark",
    bgSoft: "bg-kolabora-neutral-dark/10",
  },
  neutral_white: {
    bg: "bg-kolabora-neutral-white",
    text: "text-kolabora-neutral-white",
    bgSoft: "bg-kolabora-neutral-white/20",
  },
};

export function accentClasses(color: EventTheme["accent_color"] | undefined) {
  return ACCENT_CLASSES[color ?? "primary"];
}

/**
 * Signature Event's own visual key (Signaturee 2026 — see `Signaturee
 * visual key/kode color pelatte.txt`) is a fixed brand identity, not an
 * admin-selectable option like `accentClasses()` above — so this takes no
 * argument. Same return shape as `accentClasses()` so the Signature
 * section components barely change.
 */
export function signatureeClasses() {
  return {
    bg: "bg-signaturee-orange",
    text: "text-signaturee-orange",
    bgSoft: "bg-signaturee-cream",
  };
}
