import { Badge } from "@/components/ui/badge";
import { cn } from "@/lib/utils";

interface StatusBadgeProps {
  status: "active" | "inactive" | "late" | "emergency" | "pending" | "completed";
  children: React.ReactNode;
  className?: string;
}

export function StatusBadge({ status, children, className }: StatusBadgeProps) {
  const statusColors = {
    active: "bg-[hsl(140,60%,45%)] text-white border-[hsl(140,60%,35%)]",
    inactive: "bg-muted text-muted-foreground border-muted-border",
    late: "bg-[hsl(25,90%,55%)] text-white border-[hsl(25,90%,45%)]",
    emergency: "bg-destructive text-destructive-foreground border-destructive-border",
    pending: "bg-[hsl(45,90%,55%)] text-white border-[hsl(45,90%,45%)]",
    completed: "bg-[hsl(140,60%,45%)] text-white border-[hsl(140,60%,35%)]",
  };

  return (
    <Badge
      className={cn(
        "border",
        statusColors[status],
        className
      )}
    >
      {children}
    </Badge>
  );
}
