const TransactionStatusBadge = ({ status }) => {
  let badgeProps = {
    className: ['h-fit md:text-caption-2 whitespace-nowrap'],
    text: ''
  }
  switch (status) {
    case 'belum_bayar':
      badgeProps.className.push('badge-solid-red')
      badgeProps.text = 'Belum Bayar'
      break
    case 'cancel':
      badgeProps.className.push('badge-solid-red')
      badgeProps.text = 'Pesanan Batal'
      break
    case 'draft':
      badgeProps.className.push('badge-red')
      badgeProps.text = 'Pending Quotation'
      break
    case 'waiting':
      badgeProps.className.push('badge-yellow')
      badgeProps.text = 'Pesanan Diproses'
      break
    case 'sale':
      badgeProps.className.push('badge-yellow')
      badgeProps.text = 'Pesanan Dikemas'
      break
    case 'shipping':
      badgeProps.className.push('badge-green')
      badgeProps.text = 'Pesanan Dikirim'
      break
    case 'partial_shipping':
      badgeProps.className.push('badge-green')
      badgeProps.text = 'Dikirim Sebagian'
      break
    case 'done':
      badgeProps.className.push('badge-solid-green')
      badgeProps.text = 'Pesanan selesai'
      break
  }
  badgeProps.className = badgeProps.className.join(' ')

  return <div className={badgeProps.className}>{badgeProps.text}</div>
}

export default TransactionStatusBadge
