import type { Customer, EnquiryStatus, QuotationStatus } from '../api/types';

export function getCustomerStatusLabel(status: Customer['customerStatus']) {
  return (
    {
      active: 'Active',
      prospect: 'Prospect',
      inactive: 'Inactive'
    }[status] ?? status
  );
}

export function getEnquiryStatusLabel(status: EnquiryStatus) {
  return (
    {
      new: 'New',
      qualifying: 'Qualifying',
      requirement: 'Requirement',
      follow_up: 'Follow Up',
      converted: 'Converted',
      closed_lost: 'Closed Lost',
      cancelled: 'Cancelled'
    }[status] ?? status
  );
}

export function getQuotationStatusLabel(status: QuotationStatus) {
  return (
    {
      draft: 'Draft',
      pending_approval: 'Pending Approval',
      approved: 'Approved',
      rejected: 'Rejected',
      sent: 'Sent',
      accepted: 'Accepted',
      lost: 'Lost',
      cancelled: 'Cancelled',
      revised: 'Revised'
    }[status] ?? status
  );
}
