import React from 'react';
import { View, Text } from 'react-native';
import { cn } from '@/lib/utils';

interface BadgeProps {
  label:      string | number;
  variant?:   'default' | 'success' | 'destructive' | 'muted';
  className?: string;
}

const variantMap = {
  default:     'bg-primary',
  success:     'bg-success',
  destructive: 'bg-destructive',
  muted:       'bg-surfaceHigh border border-border',
};

export function Badge({ label, variant = 'default', className }: BadgeProps) {
  return (
    <View className={cn('rounded-full px-2 py-0.5 items-center justify-center', variantMap[variant], className)}>
      <Text className="text-white text-xs font-semibold">{label}</Text>
    </View>
  );
}
