export const formatCurrency = (amount) =>
  new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(amount || 0);

export const formatDate = (date) =>
  date ? new Date(date).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric' }) : '—';

export const roleLabels = {
  teacher: 'Teacher',
  admin_staff: 'Admin Staff',
  principal: 'Principal',
  support: 'Support Staff',
  librarian: 'Librarian',
  counselor: 'Counselor',
};

export const statusColors = {
  active: 'bg-emerald-100 text-emerald-700',
  on_leave: 'bg-amber-100 text-amber-700',
  terminated: 'bg-red-100 text-red-700',
  graduated: 'bg-blue-100 text-blue-700',
  withdrawn: 'bg-red-100 text-red-700',
  draft: 'bg-slate-100 text-slate-600',
  processed: 'bg-blue-100 text-blue-700',
  paid: 'bg-emerald-100 text-emerald-700',
  pending: 'bg-amber-100 text-amber-700',
  completed: 'bg-emerald-100 text-emerald-700',
  failed: 'bg-red-100 text-red-700',
  refunded: 'bg-slate-100 text-slate-600',
};

export const paymentTypeLabels = {
  tuition: 'Tuition',
  transport: 'Transport',
  library: 'Library',
  exam: 'Exam Fees',
  uniform: 'Uniform',
  other: 'Other',
};

export const paymentMethodLabels = {
  cash: 'Cash',
  card: 'Card',
  bank_transfer: 'Bank Transfer',
  online: 'Online',
};
