/**
 * Badge styling for B2CDataTable (`type: 'badge'`, valueMap). Minimal subset aligned with TLP look.
 */

export const BADGE_BASE_CLASSES =
  "inline-flex items-center px-2.5 py-0.5 rounded text-normal font-normal";

export const DEFAULT_BADGE_ENTRY = {
  label: "—",
  class:
    "bg-surface-200 text-surface-700 dark:bg-surface-600 dark:text-surface-200",
};

const PRESET = {
  success:
    "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",
  info: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",
  warn: "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",
  danger: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",
  secondary:
    "bg-surface-200 text-surface-700 dark:bg-surface-600 dark:text-surface-200",
};

/** Semantic badge classes for list rows (e.g. company dashboard). */
export const PRESET_BADGE_CLASSES = {
  success: PRESET.success,
  info: PRESET.info,
  warn: PRESET.warn,
  danger: PRESET.danger,
  secondary: PRESET.secondary,
  purple:
    "bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",
};

export const SEVERITY_TO_BADGE_CLASS = {
  success: PRESET.success,
  info: PRESET.info,
  warn: PRESET.warn,
  danger: PRESET.danger,
  secondary: PRESET.secondary,
  contrast:
    "bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-300",
};

/** Keys `'true'` / `'false'` — boolean columns in B2CDataTable filters. */
export const ACTIVE_INACTIVE_BADGES = {
  true: { label: "Yes", class: PRESET.success },
  false: { label: "No", class: PRESET.secondary },
};
