import React from 'react'; import { PieceInfo } from '@/lib/ifc/ifcLoaderService'; import { Box, Layers, CheckCircle2, Clock } from 'lucide-react'; interface PieceHoverTooltipProps { piece: PieceInfo | null; position: { x: number; y: number } | null; productionInfo?: { pointedQty?: number; totalQty?: number; currentStage?: string; stageColor?: string; }; } export const PieceHoverTooltip: React.FC = ({ piece, position, productionInfo, }) => { if (!piece || !position) return null; return (
{/* Header Badge */}
Marca Principal {piece.pieceMark || 'Sem Marca'}
{piece.phase && ( Fase {piece.phase} )}
{/* Details Grid */}
{piece.section && (
Perfil / Bitola: {piece.section}
)} {piece.childrenIDs && piece.childrenIDs.length > 0 && (
Componentes: {piece.childrenIDs.length} peças soldadas
)} {/* Production Apontamentos */} {productionInfo && (
Apontamento: {productionInfo.pointedQty ?? 0} de {productionInfo.totalQty ?? 1} peças
{productionInfo.currentStage && (
Etapa Atual: {productionInfo.currentStage}
)}
)}
); };