// Shared constants for the dashboard

// API fetch limits
export const AUDIT_FETCH_LIMIT = 500;
export const QUARANTINE_FETCH_LIMIT = 100;
export const SOURCE_FETCH_LIMIT = 200;

// Source status badge colors
export const SOURCE_STATUS_COLORS = {
  active: "bg-emerald-500/10 text-emerald-500 border-emerald-500/20",
  deprecated: "bg-amber-500/10 text-amber-500 border-amber-500/20",
  quarantined: "bg-red-500/10 text-red-500 border-red-500/20",
} as const;

// Source tier labels (used by TierBadge when tier_label is unavailable)
export const TIER_LABELS: Record<number, string> = {
  0: "Regulatory",
  1: "Clinical",
  2: "Observational",
  3: "Expert",
  4: "Community",
  5: "Anecdotal",
};

// Polling intervals (milliseconds)
export const CIRCUIT_POLL_INTERVAL_MS = 10_000; // 10 seconds

// Time ranges for filtering (milliseconds)
export const TIME_RANGES_MS = {
  "1h": 60 * 60 * 1000,
  "24h": 24 * 60 * 60 * 1000,
  "7d": 7 * 24 * 60 * 60 * 1000,
  "30d": 30 * 24 * 60 * 60 * 1000,
} as const;

export type TimeRangeKey = keyof typeof TIME_RANGES_MS;
