'use client' import { CreditCard, Wallet, Edit, Trash2, Plus } from 'lucide-react' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import type { PaymentMethod } from '@/lib/types' interface PaymentMethodListProps { paymentMethods: PaymentMethod[] } export function PaymentMethodList({ paymentMethods }: PaymentMethodListProps) { return ( Payment Methods {paymentMethods.map((method) => (
{/* Icon */}
{method.type === 'card' ? ( ) : ( )}
{/* Details */}

{method.type === 'card' ? `${method.brand?.toUpperCase()} •••• ${method.last4}` : `PayPal - ${method.email}`}

{method.isDefault && ( Default )}
{/* Actions */}
))} {/* Add New */}
) }