import { LucideIcon } from 'lucide-react';
import { Box } from './Box';
import { Icon } from './Icon';
import { Text } from './Text';

export interface InfoItemProps {
  label: string;
  value: string | number;
  icon: LucideIcon;
  intent?: 'primary' | 'success' | 'warning' | 'critical' | 'telemetry' | 'high' | 'med' | 'low';
}

export const InfoItem = ({ 
  label, 
  value, 
  icon, 
  intent = 'med' 
}: InfoItemProps) => {
  return (
    <Box display="flex" alignItems="center" gap={3}>
      <Box padding={2} rounded="lg" bg="var(--ui-color-bg-surface-muted)">
        <Icon icon={icon} size={4} intent={intent as any} />
      </Box>
      <Box>
        <Text size="xs" variant="low" block style={{ fontSize: '10px' }}>
          {label}
        </Text>
        <Text size="xs" weight="medium" variant="high" block truncate>
          {value}
        </Text>
      </Box>
    </Box>
  );
};
