'use client';

import { TaskStatus } from '@/lib/types';
import { getStatusConfig, getStatusBadgeClasses } from '@/lib/status-config';

interface StatusBadgeProps {
  status: TaskStatus;
  className?: string;
}

export function StatusBadge({ status, className = '' }: StatusBadgeProps) {
  const config = getStatusConfig(status);
  const badgeClasses = getStatusBadgeClasses(status);
  
  return (
    <span className={`text-xs px-2 py-0.5 rounded font-medium border ${badgeClasses} ${className}`}>
      {config.icon} {config.label}
    </span>
  );
}
