import * as react_jsx_runtime from 'react/jsx-runtime'; /** * OpportunityCard — WealthX DS (L3 Card) * * Kanban card for a single loan opportunity in the Pipeline board. * Renders customer info, loan metadata, task progress, and quick actions. * * This component is display-only — drag-and-drop is handled by the * KanbanColumn wrapper in the app. * * Data source: `listLoans()` → `Opportunity` in `loan-crm.ts` */ type Priority = "HIGH" | "MEDIUM" | "LOW" | "NONE"; interface OpportunityTask { id: string; title: string; completed: boolean; } type CrmSyncStatus = "idle" | "syncing" | "synced" | "error"; /** A connected Broker CRM (e.g. Quicklii) this opportunity can sync/activate to. */ interface CrmSyncTarget { id: string; name: string; status: CrmSyncStatus; /** ISO date string of the last successful sync, shown once `status` is `"synced"`. */ lastSyncedAt?: string; } interface OpportunityCardProps { id: string; customerName: string; customerPhone?: string; customerEmail?: string; /** Number of additional co-applicants beyond the primary contact. */ additionalContacts?: number; loanType?: string; loanPurposeLabel?: string; /** Loan amount in dollars. */ amount: number; /** ISO date string of the opportunity creation date. */ date: string; priority: Priority; /** Days the opportunity has been in its current stage. */ daysSinceColumnChanged?: number; /** * Stage threshold for MEDIUM (orange) warning color. * Comes from `Stage.warningDays`. */ warningDays?: number; /** * Stage threshold for HIGH (red) priority color. * Comes from `Stage.priorityDays`. */ priorityDays?: number; /** ISO date string — if set, the card shows an "On hold until …" banner. */ onHoldTo?: string | null; /** * When `true`, the card renders in on-hold mode regardless of `onHoldTo`. * Timer/dot hidden, dropdown hides "Change priority"/"Put on hold", action * area shows "Place Back" only. Set by KanbanColumn for every card in the * on-hold column — no need to stamp `onHoldTo` just to activate the mode. */ isOnHold?: boolean; /** Whether this opportunity represents a modification of a completed loan. */ isModifyCompletedLoan?: boolean; tasks?: OpportunityTask[]; /** Title of the next pending task (shown as a hint below the task list). */ nextTask?: string | null; /** * URL for the loan application form. * Not rendered by OpportunityCard — used by KanbanColumn to forward * to LeadCard when this opportunity is in the Leads stage. */ loanApplicationUrl?: string; /** Fires when clicking the non-interactive card body (e.g. to open the summary drawer). */ onCardClick?: () => void; onViewDetails?: () => void; onTaskToggle?: (taskId: string) => void; onMarkAsDone?: () => void; onMoveToNextStage?: () => void; onChangePriority?: () => void; onDelete?: () => void; onPutOnHold?: () => void; /** * Callback for the "Place Back" button — shown only when the card is in the * On Hold column. When provided, the card renders in on-hold column mode: * priority dot/timer are hidden, dropdown hides "Change priority" and "Put on hold", * and the action area shows "Place Back" instead of "Move to next stage"/"Mark as done". */ onPlaceBack?: () => void; /** * Sends this opportunity's data to the AI Chrome extension. * Shown as a Sparkles icon button on the card header, visible on hover. */ onSendToAI?: (opportunity: OpportunityCardProps) => void; /** * Connected Broker CRMs (e.g. Quicklii) this opportunity can sync/activate to. * Omit or leave empty to hide the sync button entirely. */ crmSyncTargets?: CrmSyncTarget[]; /** Fires when the broker activates or re-syncs a specific CRM target. */ onSyncCrmTarget?: (targetId: string) => void; /** Shows a loading state on action buttons while an async op is in flight. */ isSubmitting?: boolean; /** Whether the card is draggable (HTML5 native DnD). */ draggable?: boolean; onDragStart?: React.DragEventHandler; className?: string; /** * Render mode for the card: * - `"deal"` (default) — full opportunity info with task accordion. * - `"task"` — compact task-first layout (next task, progress, deal ref). */ viewMode?: "deal" | "task"; } declare function OpportunityCard({ id, customerName, customerPhone, customerEmail, additionalContacts, loanType, loanPurposeLabel, amount, date, priority, daysSinceColumnChanged, warningDays, priorityDays, onHoldTo, isOnHold, isModifyCompletedLoan, tasks, nextTask, onCardClick, onViewDetails, onTaskToggle, onMarkAsDone, onMoveToNextStage, onChangePriority, onDelete, onPutOnHold, onPlaceBack, onSendToAI, crmSyncTargets, onSyncCrmTarget, isSubmitting, draggable, onDragStart, className, viewMode, }: OpportunityCardProps): react_jsx_runtime.JSX.Element; interface LeadCardProps { id: string; customerName: string; customerPhone?: string; customerEmail?: string; onSendLoanApplication?: () => void; loanApplicationUrl?: string; onDelete?: () => void; onSendToAI?: () => void; isSubmitting?: boolean; className?: string; } declare function LeadCard({ customerName, customerPhone, customerEmail, onSendLoanApplication, loanApplicationUrl, onDelete, onSendToAI, isSubmitting, className, }: LeadCardProps): react_jsx_runtime.JSX.Element; export { type CrmSyncStatus, type CrmSyncTarget, LeadCard, type LeadCardProps, OpportunityCard, type OpportunityCardProps, type OpportunityTask, type Priority };