/**
 * Configuration mapping utility functions for My Requests
 */

import { Flame, Target, CheckCircle, XCircle, Clock, Edit, AlertCircle } from 'lucide-react';
import { LucideIcon } from 'lucide-react';

interface PriorityConfig {
  color: string;
  icon: LucideIcon;
  iconColor: string;
}

interface StatusConfig {
  color: string;
  icon: LucideIcon;
  iconColor: string;
}

/**
 * Get priority configuration (color, icon, etc.)
 */
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',
      };
  }
}

/**
 * Get status configuration (color, icon, etc.)
 */
export function getStatusConfig(status: string): StatusConfig {
  switch (status) {
    case 'approved':
      return {
        color: 'bg-green-100 text-green-800 border-green-200',
        icon: CheckCircle,
        iconColor: 'text-green-600',
      };
    case 'rejected':
      return {
        color: 'bg-red-100 text-red-800 border-red-200',
        icon: XCircle,
        iconColor: 'text-red-600',
      };
    case 'pending':
      return {
        color: 'bg-yellow-100 text-yellow-800 border-yellow-200',
        icon: Clock,
        iconColor: 'text-yellow-600',
      };
    case 'closed':
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: CheckCircle,
        iconColor: 'text-gray-600',
      };
    case 'draft':
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: Edit,
        iconColor: 'text-gray-600',
      };
    default:
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: AlertCircle,
        iconColor: 'text-gray-600',
      };
  }
}

