'use client';

/**
 * PriorityBadge Component
 *
 * Displays issue priority with appropriate styling.
 *
 * @module features/issues/components/PriorityBadge
 */

import { Badge } from '@/components/ui/badge';
import { cn } from '@/lib/utils';
import type { IssuePriority } from '../types';
import { PRIORITY_CONFIG } from '../constants';

interface PriorityBadgeProps {
  priority: IssuePriority;
  className?: string;
}

export function PriorityBadge({ priority, className }: PriorityBadgeProps) {
  const config = PRIORITY_CONFIG[priority] || PRIORITY_CONFIG.medium;

  return (
    <Badge className={cn(config.color, className)} variant="outline">
      {config.label}
    </Badge>
  );
}
