import React from 'react';

type BadgeVariant = 'default' | 'vip' | 'success' | 'warning' | 'error';

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

const styleMap: Record<BadgeVariant, string> = {
  default: 'border-[#333] text-[#555]',
  vip: 'border-[#ff4500]/40 text-[#ff4500]',
  success: 'border-[#ff4500]/40 text-[#ff4500]',
  warning: 'border-[#ff4500]/40 text-[#ff4500]',
  error: 'border-[#cc3300]/40 text-[#cc3300]',
};

export default function Badge({ children, variant = 'default', className = '' }: BadgeProps) {
  return (
    <span className={`inline-block px-1.5 py-0.5 text-[8px] font-semibold tracking-[0.08em] uppercase border ${styleMap[variant]} ${className}`}>
      {children}
    </span>
  );
}
