import type { RegionalInventoryStats } from '../../types'; /** Counts are subsets of inventory and use the same filtered rows as the total. */ 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); return 其中异动 {abnormal} 台 其中待交车 {pending} 台 ; }