/** * WorthDoing.ai * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: src/components/wd/badges.tsx * Description: Status/phase badges — color always paired with a text label, never color alone. */ import { cn } from "@/lib/utils"; const HYPOTHESIS_STYLES: Record = { proposed: "bg-secondary text-ink-soft", investigating: "bg-tele/10 text-tele", supported: "bg-verdict/10 text-verdict", validated: "bg-verdict/15 text-verdict", weakened: "bg-signal/12 text-signal", rejected: "bg-rust/10 text-rust", }; export function HypothesisBadge({ status }: { status: string }) { return ( {status} ); } const PHASE_LABELS: Record = { scouting: "Scouting", investigating: "Investigating", skeptic: "Skeptic phase", synthesizing: "Synthesizing", done: "Done", }; const PHASE_STYLES: Record = { scouting: "bg-tele/10 text-tele", investigating: "bg-verdict/10 text-verdict", skeptic: "bg-signal/12 text-signal", synthesizing: "bg-ink/8 text-ink", done: "bg-secondary text-ink-soft", }; export function PhaseBadge({ phase, live }: { phase: string; live?: boolean }) { return ( {live && } {PHASE_LABELS[phase] ?? phase} ); } const STATUS_STYLES: Record = { pending: "bg-secondary text-ink-soft", running: "bg-verdict/10 text-verdict", completed: "bg-ink/8 text-ink", failed: "bg-rust/10 text-rust", cancelled: "bg-secondary text-ink-soft", }; export function InvestigationStatusBadge({ status, live }: { status: string; live?: boolean }) { return ( {live && status === "running" && } {status} ); } export function EvidenceKindBadge({ kind }: { kind: string }) { const styles: Record = { support: "bg-verdict/10 text-verdict", contradict: "bg-rust/10 text-rust", context: "bg-secondary text-ink-soft", }; return ( {kind} ); }