import React from 'react' import { Group } from 'react-konva' import { InteractionLevel, Topology } from '../../../../shapes' import RoomContainer from '../RoomContainer' import GrayContainer from '../GrayContainer' function TopologyGroup({ topology, interactionLevel }) { if (!topology) { return } if (interactionLevel.mode === 'BUILDING') { return ( {topology.rooms.map((roomId) => ( ))} ) } return ( {topology.rooms .filter((roomId) => roomId !== interactionLevel.roomId) .map((roomId) => ( ))} {interactionLevel.mode === 'ROOM' ? : null} {topology.rooms .filter((roomId) => roomId === interactionLevel.roomId) .map((roomId) => ( ))} ) } TopologyGroup.propTypes = { topology: Topology, interactionLevel: InteractionLevel, } export default TopologyGroup