import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Row, Col, Card, Button, Tag, Typography, Space, Tooltip, List, Avatar, Select, Divider, } from 'antd'; import { CaretUpOutlined, CaretDownOutlined, CaretLeftOutlined, CaretRightOutlined, FullscreenOutlined, ReloadOutlined, MonitorOutlined, VideoCameraOutlined, ThunderboltOutlined, CustomerServiceOutlined, AlertOutlined, EyeOutlined } from '@ant-design/icons'; const { Text, Title } = Typography; function cn(...classes: string[]) { return classes.filter(Boolean).join(' '); } export default function VideoControl() { const { t } = useTranslation(); const [selectedDevice, setSelectedDevice] = useState(DEVICES[0]); const onlineDevices = DEVICES.filter(d => d.status === 'online' || d.status === 'alert'); const getVideoConfig = (type: string) => { switch (type) { case '安防型': return { count: 4, labels: [t('video.labelMainFront'), t('video.labelRear'), t('video.labelLeft'), t('video.labelRight')], gridClass: 'grid-cols-2 grid-rows-2' }; case '运输型': return { count: 5, labels: [t('video.labelFrontDrive'), t('video.labelRearMount'), t('video.labelLeftWing'), t('video.labelRightWing'), t('video.labelCargo')], gridClass: 'grid-cols-4 grid-rows-2' }; case '巡检型': default: return { count: 3, labels: [t('video.labelMainProbe'), t('video.labelPanorama'), t('video.labelDetail')], gridClass: 'grid-cols-2 grid-rows-2' }; } }; const config = getVideoConfig(selectedDevice.type); return ( {/* Video Content */} {/* Top Control Bar */}
{t('video.currentDutyDevice')}