import React from "react";
import MachineInstance from "./machineInstance/machineInstance";
import { useMachineStore } from "../../../../store/simulation/useMachineStore";
import MachineContentUi from "../../ui3d/MachineContentUi";

function MachineInstances() {
    const { machines } = useMachineStore();
    return (
        <>
            {machines.map((machine: MachineStatus) => (
                <React.Fragment key={machine.modelUuid}>
                    <MachineInstance machineDetail={machine} />
                    <MachineContentUi machine={machine} />
                </React.Fragment>
            ))}
        </>
    );
}

export default MachineInstances;
