import { cn } from '@/lib/utils'; import { Label } from '@/components/ui/label'; import { Input } from '@/components/ui/input'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Button } from '@/components/ui/button'; const PAYMENT_METHODS = [ ['manual', 'Manual'], ['bank', 'Bank Transfer'], ['card', 'Card'], ['autopay', 'Autopay'], ['check', 'Check'], ['cash', 'Cash'], ]; // Add/edit form for a manual payment on a bill (edit mode). Presentational — // the parent owns the form state, the submit handler, and open/close. export default function PaymentFormFields({ inp, editingPayment, paymentBusy, amount, setAmount, date, setDate, method, setMethod, notes, setNotes, onSubmit, onCancel, }) { return (

{editingPayment ? 'Edit payment' : 'Add payment'}

manual
setAmount(e.target.value)} className={cn(inp, 'font-mono')} required />
setDate(e.target.value)} className={cn(inp, 'font-mono')} required />
setNotes(e.target.value)} className={inp} placeholder="Paid from checking" />
); }