import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; import { OpportunityCardProps } from './opportunity-card.js'; /** * KanbanColumn — WealthX DS (L4 Section) * * Kanban column wrapper for the Pipeline board. * Renders the stage header (name, count, total value, growth chip) and * a scrollable list of OpportunityCard items. * * **Does NOT include:** * - Drag-and-drop (react-dnd) — handled by the app's KanbanBoard wrapper. * - Infinite scroll logic — the app passes `loaderRef` and manages IntersectionObserver. * * Data source: `Stage` from `loan-crm.ts` via `useInfiniteColumnOpportunities`. */ interface KanbanColumnStage { id: string; name: string; /** Number of opportunities currently in this stage. */ count: number; /** Total loan value across all opportunities in this stage. */ totalValue: number; /** * Growth metric for the column (e.g. new opps this week). * Positive → success color; negative/zero → destructive color. */ growth?: number | null; /** * Optional top-border accent color. * Pass a CSS variable string: `"var(--color-destructive)"`. * Defaults to `"var(--color-border)"`. */ accentColor?: string | null; /** * Optional color for the stage count number in the column header. * Pass a CSS variable string: `"var(--color-destructive)"`. * Defaults to `text-muted-foreground`. */ countColor?: string | null; } interface KanbanColumnProps { stage: KanbanColumnStage; /** Opportunity cards to render in this column. */ opportunities: OpportunityCardProps[]; /** Whether this column is currently being dragged. Reduces opacity. */ isDragging?: boolean; /** * Whether a card is hovering over this column and can be dropped. * Shows a drop-target highlight. */ isDropTarget?: boolean; /** * Whether this is a fixed/system column (Leads, On Hold, High Priority). * Fixed columns show no Delete option in the menu. */ isDefault?: boolean; /** Shows a full-column skeleton/spinner on initial load. */ isLoading?: boolean; /** Shows a small spinner at the bottom while fetching the next page. */ isLoadingMore?: boolean; /** Whether there are more opportunities to load. */ hasMore?: boolean; /** * Ref for the loader sentinel element at the column bottom. * Attach an IntersectionObserver in the app to call `fetchNextPage()` when visible. */ loaderRef?: React.Ref; onEditColumn?: () => void; /** Only shown for non-default columns. */ onDeleteColumn?: () => void; /** * When provided, renders a `+` icon button in the column header. * Intended for the Leads column — opens the Add Lead flow. */ onAddLead?: () => void; onTaskToggle?: (opportunityId: string, taskId: string) => void; onMarkAsDone?: (opportunityId: string) => void; onMoveToNextStage?: (opportunityId: string) => void; onSendLoanApplication?: (opportunityId: string) => void; /** Fires when clicking the non-interactive card body. */ onCardClick?: (opportunityId: string) => void; onViewDetails?: (opportunityId: string) => void; onChangePriority?: (opportunityId: string) => void; onPutOnHold?: (opportunityId: string) => void; onPlaceBack?: (opportunityId: string) => void; /** When true, every card in this column renders in on-hold mode. */ isOnHoldColumn?: boolean; onDeleteOpportunity?: (opportunityId: string) => void; onSendToAI?: (opp: OpportunityCardProps) => void; /** Fires when a broker activates/re-syncs a CRM target on a card (BUILD-2228). */ onSyncCrmTarget?: (opportunityId: string, targetId: string) => void; /** Fires when a card is dropped onto this column (HTML5 DnD). */ onCardDrop?: (cardId: string) => void; /** Opportunity ID currently being submitted — disables that card's actions. */ submittingOpportunityId?: string | null; className?: string; } declare function KanbanColumn({ stage, opportunities, isDragging, isDropTarget, isDefault, isLoading, isLoadingMore, hasMore, loaderRef, onEditColumn, onDeleteColumn, onAddLead, onTaskToggle, onMarkAsDone, onMoveToNextStage, onSendLoanApplication, onCardClick, onViewDetails, onChangePriority, onPutOnHold, onPlaceBack, isOnHoldColumn, onDeleteOpportunity, onSendToAI, onSyncCrmTarget, onCardDrop, submittingOpportunityId, className, }: KanbanColumnProps): react_jsx_runtime.JSX.Element; export { KanbanColumn, type KanbanColumnProps, type KanbanColumnStage };