import { adminComponentStyles } from "./design-system";

type BadgeVariant =
  | "success"
  | "warning"
  | "danger"
  | "info"
  | "neutral"
  | "accent";

interface AdminBadgeProps {
  children: React.ReactNode;
  variant?: BadgeVariant;
  className?: string;
}

export default function AdminBadge({
  children,
  variant = "neutral",
  className = "",
}: AdminBadgeProps) {
  const variantStyles = {
    success: adminComponentStyles.badge.success,
    warning: adminComponentStyles.badge.warning,
    danger: adminComponentStyles.badge.danger,
    info: adminComponentStyles.badge.info,
    neutral: adminComponentStyles.badge.neutral,
    accent: adminComponentStyles.badge.accent,
  }[variant];

  return (
    <span
      className={`${adminComponentStyles.badge.base} ${variantStyles} ${className}`}
    >
      {children}
    </span>
  );
}
