import { THERMOCYCLER_MODULE_TYPE } from '@opentrons/shared-data' ; import type { RobotState } from '../' ; export const thermocyclerPipetteCollision = ( modules , labware , labwareId ) : boolean => { const labwareSlot = labware [ labwareId ] ?. slot ; const moduleUnderLabware = modules && labwareSlot && Object . keys ( modules ) . find ( ( moduleId ) => moduleId === labwareSlot ) ; const moduleState = moduleUnderLabware && modules [ moduleUnderLabware ] . moduleState ; const isTCLidClosed = Boolean ( moduleState && moduleState . type === THERMOCYCLER_MODULE_TYPE && moduleState . lidOpen !== true ) ; return isTCLidClosed ; } ;