import React from "react"; import { cn } from "@/lib/utils"; import { formatCurrency } from "@/lib/format-currency"; import { formatDateShort } from "@/lib/format-date"; import { Button } from "@/components/ui/button"; /** * Loan draft selector shown on the "Select application to continue" screen. * Two variants (BUILD-1612): * - Multi-draft: grid of cards — consumer renders when loans.length > 1 * - Single-draft: consumer can skip this screen entirely when loans.length === 1 * * This component always renders the grid. The caller decides whether to show it. */ export type LoanCardApplicant = { name: string; isMain: boolean; }; export type LoanCardItem = { id: string; /** ISO date string */ createdAt: string; desiredLoanAmount?: number; isJoint: boolean; applicants: LoanCardApplicant[]; }; export type LoanApplicationCardsProps = { loans: LoanCardItem[]; onSelect: (id: string) => void; onBack: () => void; companyName?: string; className?: string; }; export function LoanApplicationCards({ loans, onSelect, onBack, companyName, className, }: LoanApplicationCardsProps) { return (
Tip: Get technical and broker support by visiting the support section within the app
What loan application would you like to continue?
{/* Card grid */}