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 marginBottom={0.5} style={{ fontSize: '10px' }}>
          {label}
        </Text>
        <Text size="xs" weight="medium" variant="high" block className="truncate">
          {value}
        </Text>
      </Box>
    </Box>
  );
};
