import { Badge } from '@/components/shadcn/ui/badge'
import { PaymentStatus } from '@/lib/types/payment'
import React from 'react'

const PaymentStatusBadge: React.FC<{ status: PaymentStatus }> = ({
  status,
}) => {
  switch (status) {
    case 'SUCCESS':
      return (
        <Badge
          variant="outline"
          className="px-4 py-1 bg-green-200 text-green-700"
        >
          SUCCESS
        </Badge>
      )
    case 'FAILED':
      return (
        <Badge variant="outline" className="px-4 py-1 bg-red-200 text-red-700">
          FAILED
        </Badge>
      )
    case 'CANCELLED':
      return (
        <Badge variant="outline" className="px-4 py-1 bg-red-200 text-red-700">
          CANCELLED
        </Badge>
      )
    case 'FULLY_REFUNDED':
      return (
        <Badge
          variant="outline"
          className="px-4 py-1 bg-gray-200 text-gray-700"
        >
          FULLY REFUNDED
        </Badge>
      )
    case 'PARTIALLY_REFUNDED':
      return (
        <Badge
          variant="outline"
          className="px-4 py-1 bg-gray-200 text-gray-700"
        >
          PARTIALLY REFUNDED
        </Badge>
      )
    default:
      return (
        <Badge
          variant="outline"
          className="px-4 py-1 bg-amber-200 text-amber-700"
        >
          PENDING
        </Badge>
      )
  }
}

export default PaymentStatusBadge
