/** * 产业链流程式导航组件 * * 显示上游 → 核心 → 下游的流程式导航 * 带图标箭头连接符 */ import React, { memo } from 'react'; import { HStack, VStack, Box, Text, Icon, Badge } from '@chakra-ui/react'; import { FaArrowRight } from 'react-icons/fa'; // 黑金主题配置 const THEME = { gold: '#D4AF37', textSecondary: 'gray.400', upstream: { active: 'orange.500', activeBg: 'orange.900', inactive: 'white', inactiveBg: 'gray.700', }, core: { active: 'blue.500', activeBg: 'blue.900', inactive: 'white', inactiveBg: 'gray.700', }, downstream: { active: 'green.500', activeBg: 'green.900', inactive: 'white', inactiveBg: 'gray.700', }, }; export type TabType = 'upstream' | 'core' | 'downstream'; interface ProcessNavigationProps { activeTab: TabType; onTabChange: (tab: TabType) => void; upstreamCount: number; coreCount: number; downstreamCount: number; } interface NavItemProps { label: string; subtitle: string; count: number; isActive: boolean; colorKey: 'upstream' | 'core' | 'downstream'; onClick: () => void; } const NavItem: React.FC = memo(({ label, subtitle, count, isActive, colorKey, onClick, }) => { const colors = THEME[colorKey]; return ( {label} {count} {subtitle} ); }); NavItem.displayName = 'NavItem'; const ProcessNavigation: React.FC = memo(({ activeTab, onTabChange, upstreamCount, coreCount, downstreamCount, }) => { return ( onTabChange('upstream')} /> onTabChange('core')} /> onTabChange('downstream')} /> ); }); ProcessNavigation.displayName = 'ProcessNavigation'; export default ProcessNavigation;