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

import { TrendingUp, Target, CheckCircle, XCircle, Clock, FileText } from 'lucide-react';

export const getPriorityConfig = (priority: string) => {
  switch (priority) {
    case 'express':
      return {
        color: 'bg-red-100 text-red-800 border-red-200',
        icon: TrendingUp,
        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 const getStatusConfig = (status: string) => {
  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 'in-progress':
      return {
        color: 'bg-blue-100 text-blue-800 border-blue-200',
        icon: Clock,
        iconColor: 'text-blue-600'
      };
    case 'closed':
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: CheckCircle,
        iconColor: 'text-gray-600'
      };
    default:
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        icon: FileText,
        iconColor: 'text-gray-600'
      };
  }
};

export const getSLAConfig = (status: string) => {
  switch (status) {
    case 'breached':
      return {
        color: 'bg-red-100 text-red-800 border-red-200',
        label: 'Breached'
      };
    case 'critical':
      return {
        color: 'bg-orange-100 text-orange-800 border-orange-200',
        label: 'Critical'
      };
    case 'approaching':
      return {
        color: 'bg-yellow-100 text-yellow-800 border-yellow-200',
        label: 'Approaching'
      };
    case 'on_track':
    case 'on-track':
      return {
        color: 'bg-green-100 text-green-800 border-green-200',
        label: 'On Track'
      };
    default:
      return {
        color: 'bg-gray-100 text-gray-800 border-gray-200',
        label: 'N/A'
      };
  }
};

