import React from 'react'
import VehicleInstance from './instance/vehicleInstance'
import { useVehicleStore } from '../../../../store/simulation/useVehicleStore'

function VehicleInstances() {

    const { vehicles } = useVehicleStore();

    return (
        <>

            {vehicles.map((vehicle: VehicleStatus) =>
                <VehicleInstance agvDetail={vehicle} key={vehicle.modelUuid} />
            )}

        </>
    )
}

export default VehicleInstances