import type { RegionalInventoryStats } from '../../types'; /** Status counts are subsets of these filtered inventory rows, never extra stock. */ export function InventoryStatusCounts({ rows }: { rows: RegionalInventoryStats[] }) { const abnormal = rows.reduce((sum, row) => sum + (row.abnormal ?? 0), 0); const pending = rows.reduce((sum, row) => sum + (row.pending ?? 0), 0); if (abnormal === 0 && pending === 0) return null; return {abnormal > 0 && 其中异动 {abnormal} 台} {pending > 0 && 其中待交车 {pending} 台} ; }