import React from 'react' import { View, Text } from '@tarojs/components' import { ChannelStatusBadge } from './StatusBadge' interface Props { channelId: number status: number voltage?: number current?: number onClick?: () => void } const COLORS: Record = { 0: '#9ca3af', // idle 1: '#16a34a', // charging 2: '#dc2626', // fault 3: '#d1d5db', // offline } export default function ChannelCard({ channelId, status, voltage, current, onClick }: Props) { return ( #{channelId} {voltage !== undefined && ( {voltage.toFixed(1)}V )} {current !== undefined && ( {current.toFixed(1)}A )} ) }