'use client' import React from 'react' interface DetectorType { detector_id: number name: string serial_number: string object: string status: string checked: boolean type: string location: string floor: number } interface DetectorMenuProps { detector: DetectorType isOpen: boolean onClose: () => void getStatusText: (status: string) => string compact?: boolean anchor?: { left: number; top: number } | null } const DetectorMenu: React.FC = ({ detector, isOpen, onClose, getStatusText, compact = false, anchor = null }) => { if (!isOpen) return null const DetailsSection: React.FC<{ compact?: boolean }> = ({ compact = false }) => (
{compact ? ( <>
Маркировка по проекту
{detector.name}
Тип детектора
{detector.type}
Местоположение
{detector.location}
Статус
{getStatusText(detector.status)}
Временная метка
Сегодня, 14:30
Этаж
{detector.floor}
) : ( <>
Маркировка по проекту
{detector.name}
Тип детектора
{detector.type}
Местоположение
{detector.location}
Статус
{getStatusText(detector.status)}
Временная метка
Сегодня, 14:30
Вчера
)}
) if (compact && anchor) { return (
Датч.{detector.name}
{getStatusText(detector.status)}
) } return (

Датч.{detector.name}

) } export default DetectorMenu