import { Link } from 'react-router-dom' import { VideoCameraIcon, SignalIcon, PlayIcon, StopIcon, } from '@heroicons/react/24/outline' import clsx from 'clsx' import { Camara } from '@/types' import { StatusBadge } from '@/components/ui/Badge' import Card from '@/components/ui/Card' import Button from '@/components/ui/Button' interface CamaraCardProps { camara: Camara onStartRecording?: () => void onStopRecording?: () => void onView?: () => void showActions?: boolean } export default function CamaraCard({ camara, onStartRecording, onStopRecording, onView, showActions = true, }: CamaraCardProps) { const getEstadoConfig = () => { switch (camara.estado) { case 'online': return { status: 'online' as const, label: 'En linea' } case 'grabando': return { status: 'online' as const, label: 'Grabando' } case 'offline': return { status: 'offline' as const, label: 'Sin conexion' } case 'error': return { status: 'error' as const, label: 'Error' } default: return { status: 'offline' as const, label: 'Desconocido' } } } const estadoConfig = getEstadoConfig() return ( {/* Header */}

{camara.nombre}

{camara.posicion}

{/* Info */}
{camara.vehiculo && (
Vehiculo: {camara.vehiculo.placa}
)} {camara.resolucion && (
Resolucion: {camara.resolucion}
)} {camara.fps && (
FPS: {camara.fps}
)}
{/* Recording indicator */} {camara.estado === 'grabando' && (
Grabando...
)} {/* Actions */} {showActions && (
{camara.estado === 'grabando' ? ( ) : ( )}
)}
) }