import React from 'react'
import PillarJibInstance from './instance/pillarJibInstance';
import { useSceneContext } from '../../../scene/sceneContext';

function CraneInstances() {
    const { craneStore } = useSceneContext();
    const { cranes } = craneStore();

    return (
        <>
            {cranes.map((crane: CraneStatus) => (
                <React.Fragment key={crane.modelUuid}>

                    {crane.subType === "pillarJib" &&
                        <PillarJibInstance key={crane.modelUuid} crane={crane} />
                    }

                </React.Fragment>
            ))}
        </>
    )
}

export default CraneInstances