import React from 'react';
import { AlertCircle, CheckCircle } from 'lucide-react';
import { Badge } from '../../components/ui/badge';

interface StatusBadgeProps {
  installed: boolean;
  running?: boolean;
}

export const StatusBadge: React.FC<StatusBadgeProps> = ({ installed, running }) => {
  if (!installed) {
    return (
      <Badge variant="secondary" className="text-xs">
        <AlertCircle className="h-3.5 w-3.5 mr-1" />
        Not Installed
      </Badge>
    );
  }

  if (running === false) {
    return (
      <Badge variant="warning" className="text-xs">
        <AlertCircle className="h-3.5 w-3.5 mr-1" />
        Not Running
      </Badge>
    );
  }

  if (running === true) {
    return (
      <Badge variant="success" className="text-xs">
        <CheckCircle className="h-3.5 w-3.5 mr-1" />
        Running
      </Badge>
    );
  }

  return (
    <Badge variant="success" className="text-xs">
      <CheckCircle className="h-3.5 w-3.5 mr-1" />
      Installed
    </Badge>
  );
};
