import type { StatusKind } from '@/components/StatusChip';
import type { TicketCategory, TicketStatus } from '@/services/tickets/types';

/** Ticket status → the semantic `StatusChip` kind. An open ticket reads as active/info, a closed one neutral. */
export function ticketStatusKind(status: TicketStatus): StatusKind {
  return status === 'open' ? 'info' : 'neutral';
}

/** The `AppIcon` name for a ticket category (inbox card + thread header). */
export function ticketCategoryIcon(category: TicketCategory): string {
  switch (category) {
    case 'coordination':
      return 'bookings';
    case 'refund':
      return 'payment';
    case 'emergency':
      return 'emergency';
    case 'support':
    default:
      return 'support';
  }
}
