/**
 * Color mapping utility functions for badges and status indicators
 */

/**
 * Get badge color class for activity action
 */
export function getActionBadgeColor(action: string): string {
  switch (action) {
    case 'Login':
      return 'text-blue-700 bg-blue-100 border-blue-200';
    case 'Created Request':
      return 'text-purple-700 bg-purple-100 border-purple-200';
    case 'Approved Request':
      return 'text-emerald-700 bg-emerald-100 border-emerald-200';
    case 'Rejected Request':
      return 'text-red-700 bg-red-100 border-red-200';
    case 'Added Comment':
      return 'text-amber-700 bg-amber-100 border-amber-200';
    case 'Viewed Request':
      return 'text-gray-700 bg-gray-100 border-gray-200';
    case 'Uploaded Document':
      return 'text-indigo-700 bg-indigo-100 border-indigo-200';
    default:
      return 'text-gray-700 bg-gray-100 border-gray-200';
  }
}

/**
 * Get badge color class for priority
 */
export function getPriorityColor(priority: string): string {
  switch (priority) {
    case 'high':
      return 'bg-red-100 text-red-800 border-red-200';
    case 'medium':
      return 'bg-orange-100 text-orange-800 border-orange-200';
    case 'low':
      return 'bg-green-100 text-green-800 border-green-200';
    default:
      return 'bg-gray-100 text-gray-800 border-gray-200';
  }
}

/**
 * Get badge color class for status
 */
export function getStatusColor(status: string): string {
  switch (status) {
    case 'Delayed':
      return 'text-red-700 bg-red-100 border-red-200';
    case 'On Time':
      return 'text-emerald-700 bg-emerald-100 border-emerald-200';
    case 'Pending':
      return 'bg-orange-100 text-orange-800 border-orange-200';
    default:
      return 'bg-gray-100 text-gray-800 border-gray-200';
  }
}

/**
 * Get background color class for days open indicator
 */
export function getDaysOpenColor(days: number): string {
  if (days >= 20) return 'bg-red-600';
  if (days >= 10) return 'bg-orange-500';
  return 'bg-amber-500';
}

