import { useEffect } from "react";
import RoboticArmInstances from "./instances/roboticArmInstances";
import { useArmBotStore } from "../../../store/simulation/useArmBotStore";
import { useSelectedEventData, useSelectedEventSphere } from "../../../store/simulation/useSimulationStore";
import ArmBotUI from "../ui/arm/armBotUI";

function RoboticArm() {
    const { armBots } = useArmBotStore();
    const { selectedEventSphere } = useSelectedEventSphere();
    const { selectedEventData } = useSelectedEventData();

    useEffect(() => {
        // console.log('armBots: ', armBots);
    }, [armBots])

    return (
        <>

            <RoboticArmInstances />

            {selectedEventSphere && selectedEventData?.data.type === "roboticArm" &&
                < ArmBotUI />
            }

        </>
    );
}

export default RoboticArm;
