/**
 * Configuration mappers for priority and status badges
 */

import { Flame, Target, CheckCircle, XCircle, AlertCircle } from 'lucide-react';
import { PriorityConfig, StatusConfig } from '../types/closedRequests.types';

export function getPriorityConfig(priority: string): PriorityConfig {
  switch (priority) {
    case 'express':
      return {
        color: 'bg-red-100 text-red-800 border-red-200',
        icon: Flame,
        iconColor: 'text-red-600'
      };
    case 'standard':
      return {
        color: 'bg-blue-100 text-blue-800 border-blue-200',
        icon: Target,
        iconColor: 'text-blue-600'
      };
    default:
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: Target,
        iconColor: 'text-gray-600'
      };
  }
}

export function getStatusConfig(status: string): StatusConfig {
  switch (status) {
    case 'closed':
      return {
        color: 'bg-slate-100 text-slate-800 border-slate-300',
        icon: CheckCircle,
        iconColor: 'text-slate-600',
        label: 'Closed',
        description: 'Request finalized and archived'
      };
    case 'rejected':
      return {
        color: 'bg-red-100 text-red-800 border-red-300',
        icon: XCircle,
        iconColor: 'text-red-600',
        label: 'Rejected',
        description: 'Request was declined'
      };
    default:
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: AlertCircle,
        iconColor: 'text-gray-600',
        label: status,
        description: ''
      };
  }
}

