import Card from '@/components/ui/Card'; import Button from '@/components/ui/Button'; import Input from '@/components/ui/Input'; import { CreditCardIcon, BuildingLibraryIcon, CheckCircleIcon, ArrowTopRightOnSquareIcon, } from '@heroicons/react/24/outline'; import { Event, PaymentOptionsConfig } from '@/lib/api'; import { formatPrice, getTpagoLink } from '@/lib/utils'; import type { BookingResult } from '../_types'; interface ManualPaymentStepProps { bookingResult: BookingResult; event: Event; paymentConfig: PaymentOptionsConfig; locale: string; paidUnderDifferentName: boolean; setPaidUnderDifferentName: (value: boolean) => void; payerName: string; setPayerName: (value: string) => void; markingPaid: boolean; onMarkPaymentSent: () => void; } export function ManualPaymentStep({ bookingResult, event, paymentConfig, locale, paidUnderDifferentName, setPaidUnderDifferentName, payerName, setPayerName, markingPaid, onMarkPaymentSent, }: ManualPaymentStepProps) { const isBankTransfer = bookingResult.paymentMethod === 'bank_transfer'; const isTpago = bookingResult.paymentMethod === 'tpago'; const ticketCount = bookingResult.ticketCount || 1; const totalAmount = (event?.price || 0) * ticketCount; const tpagoLink = getTpagoLink(paymentConfig, ticketCount); return (
{locale === 'es' ? 'Sigue las instrucciones para completar tu pago' : 'Follow the instructions to complete your payment'}
{locale === 'es' ? 'Monto a pagar' : 'Amount to pay'}
{event?.price !== undefined ? formatPrice(totalAmount, event.currency) : ''}
{ticketCount > 1 && ({ticketCount} tickets × {formatPrice(event?.price || 0, event?.currency || 'PYG')}
)}{locale === 'es' ? paymentConfig.bankNotesEs : paymentConfig.bankNotes}
)}{locale === 'es' ? paymentConfig.tpagoInstructionsEs : paymentConfig.tpagoInstructions}
)}{locale === 'es' ? 'Referencia de tu reserva' : 'Your booking reference'}
{bookingResult.qrCode}
{locale === 'es' ? 'Verificación manual' : 'Manual verification'}
{locale === 'es' ? 'El equipo de Spanglish revisará el pago manualmente. Tu reserva solo será confirmada después de recibir un email de confirmación de nuestra parte.' : 'The Spanglish team will review the payment manually. Your booking is only confirmed after you receive a confirmation email from us.'}
{locale === 'es' ? 'Solo haz clic aquí después de haber completado el pago.' : 'Only click this after you have actually completed the payment.'}
{/* I Have Paid Button */}{locale === 'es' ? 'Tu reserva será confirmada una vez que verifiquemos el pago' : 'Your booking will be confirmed once we verify the payment'}